Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metaphlan Script
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amine GHOZLANE
Metaphlan Script
Commits
c0a5aaf5
Commit
c0a5aaf5
authored
1 year ago
by
Amine GHOZLANE
Browse files
Options
Downloads
Patches
Plain Diff
Add README.md
parent
65490369
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+23
-0
23 additions, 0 deletions
README.md
with
23 additions
and
0 deletions
README.md
0 → 100644
+
23
−
0
View file @
c0a5aaf5
# Convert metaphlan marker_counts output to raw count matrix
1.
Analyse your samples with metaphlan:
The marker_counts parameter is required to output the count per marker gene:
```
metaphlan --input_type fastq --bowtie2db metaphlan_db -t marker_counts -o sample_count.tsv metagenome_1.fastq,metagenome_2.fastq
```
2.
Aggregate your counts at SGB level
The aggregation at SGB level can be performed with the following command:
```
python3 aggregate_SBG.py sample_count.tsv mpa_vOct22_CHOCOPhlAnSGB_202212_SGB_len.txt.gz sample_name sample_aggregated.tsv
```
The counts are normalized according to the length of the marker gene to a default length of 1000.
3.
Build the count matrix and the taxonomy matrix
For each sample, we can aggregate them with the following command:
```
python3 build_matrix.py sample1_aggregated.tsv sample1_aggregated.tsv output_counts.tsv output_taxonomy.tsv
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment