For abundance calculation we need to get bp of genome, currently we do this based on the contig headers info, although this can become problematic for genomes assembled by different tools (e.g. shovill renames them iirc). Replace this with a simple wc command to count bases in fasta
|
# Check if bins are original (megahit-assembled) or strict/permissive (metaspades-assembled) |
|
if [[ $bin == *.strict.fa ]] || [[ $bin == *.permissive.fa ]] || [[ $bin == *.s.fa ]] || [[ $bin == *.p.fa ]];then |
|
less $bin |grep ">"|cut -d '_' -f4|awk '{{sum+=$1}}END{{print sum}}' >> $(echo "$bin"|sed "s/.fa/.map/") |
|
else |
|
less $bin |grep ">"|cut -d '-' -f4|sed 's/len_//g'|awk '{{sum+=$1}}END{{print sum}}' >> $(echo "$bin"|sed "s/.fa/.map/") |
|
fi |
|
|
For abundance calculation we need to get bp of genome, currently we do this based on the contig headers info, although this can become problematic for genomes assembled by different tools (e.g. shovill renames them iirc). Replace this with a simple
wccommand to count bases in fastametaGEM/workflow/Snakefile
Lines 1118 to 1124 in a4daea0