-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSequencingStatistics.sh
executable file
·33 lines (29 loc) · 1.59 KB
/
SequencingStatistics.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
##
## Summarizes sequencing, assembly and annotation results for CQDM project
## By Frederic Raymond 2013-06-03
## Use :
## SequencingStatistics.sh directory
##
## Can be used within a for loop
## Example :
## for i in $(ls|grep SilverRay|grep -v SAMPLE|grep -v std); do SequencingStatistics.sh $i;done
##
## Uses the Assembly directory created by SilverRay
## Does not include header
## Header should be :
## Assembly Nucleotides_sequenced Number_of_Contigs Total_length_Assembly Average_Contig_length N50 Median_contig Largest_contig NB_Genes NB_RG NB_IS NB_Contigs_withRG-IS
##
i=$1
echo -n $i
grep "Summary" $i/Assembly/NumberOfSequences.txt -A 3|tail -n 1|sed 's/ //g'|awk -F ":" '{printf "\t" $2 "\t"}'
grep "Contigs >= 500" -A 6 $i/Assembly/OutputNumbers.txt |tail -n 6|sed 's/ //g'|awk -F ":" '{printf $2 "\t"}'
grep ">" $i/Assembly/Prodigal/Genes.fa |wc -l|awk -F ":" '{printf $1 "\t"}'
wc -l $i/Assembly/Prodigal/blast/MERGEM-RG.blast.sum.tsv|awk '{printf $1 "\t"}'
wc -l $i/Assembly/Prodigal/blast/MERGEM-IS.blast.sum.tsv|awk '{printf $1 "\t"}'
grep IS $i/Assembly/Prodigal/blast/ResistomeMobilome-Sum.tsv |wc -l|awk '{printf $1 "\t"}'
#wc -l $i/Assembly/Prodigal/blast/MERGEM-RG.blast40pIdentity.sum.tsv|awk '{printf $1 "\t"}'
#wc -l $i/Assembly/Prodigal/blast/MERGEM-IS.blast.40pIdentity.sum.tsv|awk '{printf $1 "\t"}'
#grep IS $i/Assembly/Prodigal/blast/ResistomeMobilome-Sum-40pIdentity.tsv |wc -l|awk '{printf $1 "\t"}'
echo;
#perl ~/perl/MakeGroupsForIS-RG_v3.pl $i/Assembly/Prodigal/blast/MERGEM-RG.blast.sum.tsv $i/Assembly/Prodigal/blast/MERGEM-IS.blast.sum.tsv|wc -l|awk '{printf $1 "\n"}'