Skip to content

Commit

Permalink
Merge pull request #13 from pommevilla/iss-6
Browse files Browse the repository at this point in the history
Iss 6
  • Loading branch information
pommevilla authored Nov 17, 2019
2 parents fdd23a1 + e371f12 commit 997c15e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/count_richness → src/count_presence
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/usr/bin/python3
"""
This script count how many hit found ; cutoff = 80 percent identity
usage: python make_count_diamond.py mgm4477807.3.fastq.m8 mgm4477807.3.fastq.m8
python make_count_sample_diamond.py *.m8 > gene_presence.txt
Quantifies the presence of the genes within a directory of *.m8 files.
The presence of a gene is how many samples a gene appears in.
Richness is how many samples a gene appears in.
Usage:
count_presence dir
Inputs:
- dir, a directory of .m8 files
Outputs:
- two tab-separated columns of gene name and its presence
"""

import sys
Expand Down
2 changes: 1 addition & 1 deletion src/mfpcount
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ echo "Input directory: $(readlink -f $input_dir)" >> $shortdir.log
echo "Cumulative abundance threshold: $thresh" >> $shortdir.log
echo "Summary file: $shortdir.summary.tsv" >> $shortdir.log

join -j 1 -t ' ' <(count_richness $input_dir | sort -k 1) <(count_abundance $input_dir | sort -k 1) > "$shortdir.summary.tsv"
join -j 1 -t ' ' <(count_presence $input_dir | sort -k 1) <(count_abundance $input_dir | sort -k 1) > "$shortdir.summary.tsv"

# sorting by newS
calc_sscore "$shortdir.summary.tsv" | sort -nrk 4 > temp
Expand Down

0 comments on commit 997c15e

Please sign in to comment.