{"id":17835671,"url":"https://github.com/bebatut/amma-microbiota-driven","last_synced_at":"2025-04-02T13:11:50.184Z","repository":{"id":112930312,"uuid":"557342420","full_name":"bebatut/amma-microbiota-driven","owner":"bebatut","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-26T08:30:53.000Z","size":39955,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T04:18:33.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bebatut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-25T14:12:09.000Z","updated_at":"2022-10-26T11:57:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6e1c4e6-fabd-4893-998b-1380c514d385","html_url":"https://github.com/bebatut/amma-microbiota-driven","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebatut%2Famma-microbiota-driven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebatut%2Famma-microbiota-driven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebatut%2Famma-microbiota-driven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bebatut%2Famma-microbiota-driven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bebatut","download_url":"https://codeload.github.com/bebatut/amma-microbiota-driven/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246819786,"owners_count":20839095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T20:24:10.642Z","updated_at":"2025-04-02T13:11:50.165Z","avatar_url":"https://github.com/bebatut.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"Atlas of Microglia-Microbiota in Aging (AMMA)\n=============================================\n\nMicroglia, the brain resident macrophages, display high plasticity in response to their environment. Aging of the central nervous system (CNS), where microglial physiology is especially disrupted, is a major risk factor for a myriad of neurodegenerative diseases. Therefore, it is crucial to decipher intrinsic and extrinsic factors, like sex and the microbiome, that potentially modulate this process.\n\nWe found that **microglia follow sex-dependent dynamics in aging**. This repository stores the transcriptomics data analyses and the sources for the website explaining the analysis.\n\n# Transcriptomics data analyses\n\n## Requirements\n\n- [conda](https://docs.conda.io/en/latest/miniconda.html)\n\n\n\n- Creation of the `conda` environment with all the requirements\n\n    ```\n    $ make create-env\n    ```\n\n## Preparation of files from the sequencing facility\n\n1. Rename the files from the sequencing facility to follow the naming convention\n\n    ```\n    $ python src/copy_rename_raw_files.py \\\n        --input_dir \u003cpath to input directory\u003e \\\n        --file_name_description \u003cpath to csv file with the correspondance between directory structure and sample name (from the Google drive)\u003e \\\n        --output_dir \u003cpath to output directory\u003e\\\n    ```\n\nThe naming convention for each sample is `microbiota_age_sex_replicate`\n\n## From sequences to gene counts (in Galaxy)\n\n1. Upload the data on Galaxy (e.g. [https://usegalaxy.eu/](https://usegalaxy.eu/)) inside a data library\n2. Update the details in [`config.yaml`](config.yaml), specially the API key\n3. Prepare the history in Galaxy (import the files from the data library, merge the files sequenced on 2 different lanes (for Project_S178 and Project_S225) and move the input files into collections)\n\n    ```\n    $ python src/prepare_data.py\n    ```\n\n5. Launch Galaxy workflow to extract gene counts\n\n    ```\n    $ python src/extract_gene_counts.py\n    ```\n\n    The worklow do:\n    1. Quality control and trimming using FastQC and Trim Galore!\n    2. Preliminary mapping and experiment inference using STAR and RSeQC\n    3. Mapping using STAR\n    4. Gene counting using FeatureCounts\n\nThe workflow is applied on each dataset (organized into data collection). It can take a while.\n\nOnce it is finished:\n\n1. Download the generated count table and the gene length file\n2. Put these files in the `data` folder\n\n## Differentially Expression Analysis (locally using Jupyter Notebooks)\n\n1. Launch Jupyter\n\n    ```\n    $ make launch-jupyter\n    ```\n\n3. Open [http://localhost:8888/tree/](http://localhost:8888/tree/)\n2. Move to `src` in Jupyter\n4. Prepare the data: Open `0-prepare_data.ipynb` and execute all cells\n\n### Full analysis\n\nData: SPF/GF, young/middle-aged/old, female/male\n\n1. Move to `full-data`\n\n2. Prepare the differential expression analysis\n    1. Open `1-run_dge_analysis.ipynb` and execute all cells\n    2. Open `2-previsualize_data.ipynb` and execute all cells\n\n2. Analyze the differentially expressed genes given different comparisons: Open the related notebook and execute all cells\n    \n    Analysis | Notebook\n    --- | ---\n    Effect of microbiota (GF vs SPF) for the different ages and sexes | `3-analyze_microbiota_effect_given_ages_sexes.ipynb`\n    Effect of sexes (Male vs Female) for the different ages and microbiota | `4-analyze_sex_effect_given_ages_microbiota.ipynb`\n    Effect of ages (Middle-aged vs Young, Old vs Young and Old vs Middle-aged) for the different microbiota and sexes | `6-analyze_age_effect_given_microbiota_sexes.ipynb`\n\n4. Run extra analyses\n\n    Analysis | Noteobook\n    --- | ---\n    Study of CML effect | `7-analyze_cml_effect.ipynb`\n    Postvisualize | `8-postvisualize.ipynb`\n\n## Sex-driven aging analysis\n\nData: SPF, young/middle-aged/old, female/male\n\n1. Move to `sex-driven-aging`\n\n2. Prepare the differential expression analysis\n    1. Open `1-extract_samples` and execute all cells\n    1. Open `2-run_dge_analysis.ipynb` and execute all cells\n    2. Open `3-previsualize_data.ipynb` and execute all cells\n\n3. Analyze the differentially expressed genes given different comparisons: open the related notebook and execute all cells\n\n    Analysis | Notebook\n    --- | ---\n    Effect of the sex (Male vs Female) for the 3 ages | `4-analyze-sex-effect-given-ages.ipynb`\n    Effect of the ages (Young, Middle-aged, Old) for the sexes | `4-analyze-age-effect-given-sex.ipynb`\n\n\n## Microbiota driven analysis\n\nData: SPF/GF, young/old, male\n\n1. Move to `microbiota-driven`\n\n2. Prepare the differential expression analysis\n    1. Open `1-extract_samples` and execute all cells\n    1. Open `2-run_dge_analysis.ipynb` and execute all cells\n    2. Open `3-previsualize_data.ipynb` and execute all cells\n\n3. Analyze the differentially expressed genes given different comparisons: open the related notebook and execute all cells\n\n    Analysis | Notebook\n    --- | ---\n    Effect of the sex (Male vs Female) for the 3 ages | `4-analyze-sex-effect-given-ages.ipynb`\n    Effect of the ages (Young, Middle-aged, Old) for the sexes | `4-analyze-age-effect-given-sex.ipynb`\n\n\n# Website\n\nThis folder stores the sources of the website describing the analyses in `docs` folder.\nReports from the Jupyter notebooks are available there to show the different steps and images. \n\n## Generate HTML reports from the Jupyter Notebooks\n\n```\n$ make generate-reports\n```\n\nThese reports are stored in the `docs` folder and are linked on the website.\n\n## Generate the website locally\n\n1. Install Install the website's dependencies:\n\n    ```\n    $ make install\n    ```\n\n2. Serve the website locally\n\n    ```\n    $ make serve\n    ```\n\n3. Open [http://127.0.0.1:4000/amma/](http://127.0.0.1:4000/amma/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebatut%2Famma-microbiota-driven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbebatut%2Famma-microbiota-driven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbebatut%2Famma-microbiota-driven/lists"}