-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path'
More file actions
25 lines (18 loc) · 1.09 KB
/
Copy path'
File metadata and controls
25 lines (18 loc) · 1.09 KB
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
from fastqc import fastqc
from samfile import analysis
import argparse
def main(indir, outdir, samfile, nthreads, batch=False):
_,_, out= fastqc.fastqc_runner(indir, outdir,batch=batch)
totalSeq = fastqc.summaryCollector(outdir)
print('received Total Sequences:',str(totalSeq))
paironecount, pairtwocount, pairextracount = analysis.samanalysis(samfile)
sumall = paironecount+pairtwocount+pairextracount
print('Samfile sequences count: ',str(sumall))
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="options for running fastqc")
parser.add_argument('-o','--output_dir',dest='outdir',type=str,help='where to write fastqc output')
parser.add_argument('-i','--fastq_dir',dest='indir',type=str,help='directory where fastq files are locate')
parser.add_argument('-s','--samfile',dest='samfile',type=str,help="sam file location")
parser.add_argument('-t','--threads',dest='nthreads',type=int,default=1,help="num files to process simultaneously")
opts = parser.parse_args()
main(opts.indir, opts.outdir, opts.samfile, opts.nthreads)