44
55#Arguments
66import argparse
7- parser = argparse .ArgumentParser (prog = 'Allo' , \
8- description = 'Allo is a software that allocates multi-mapped reads in ChIP-seq data\n ' \
9- 'Developed by Alexis Morrissey, Mahony Laboratory @ The Pennsylvania State University' , \
7+ version = "1.1.2"
8+ parser = argparse .ArgumentParser (prog = 'allo' , \
9+ description = '(Version ' + version + ') Allo is a software that allocates multi-mapped reads in gene regulatory data.\n ' \
10+ 'Developed by Mahony Laboratory @ The Pennsylvania State University' , \
1011 epilog = 'For more pre-processing info and basic usage, please visit https://github.com/seqcode/allo' )
12+ parser .add_argument ('-v' , '--version' , action = 'version' , version = version )
1113parser .add_argument ('input' )
1214parser .add_argument ('-seq' , type = str , nargs = 1 , help = 'Single-end or paired-end sequencing mode' , \
13- choices = ['pe' ,'se' ], required = True , dest = 'seq' )
15+ choices = ['pe' ,'se' ], dest = 'seq' , required = True )
1416parser .add_argument ('-o' , type = str , nargs = 1 , help = 'Output file name' , dest = 'outfile' , default = None )
1517parser .add_argument ('--mixed' , help = 'Use CNN trained on a dataset with mixed ChIP-seq peaks, narrow by default' , action = 'store_true' , default = None )
16- parser .add_argument ('--dnase' , help = 'Use CNN trained on a DNa -seq datasets' , action = 'store_true' , default = None )
18+ parser .add_argument ('--dnase' , help = 'Use CNN trained on a DNase -seq datasets' , action = 'store_true' , default = None )
1719parser .add_argument ('--atac' , help = 'Use CNN trained on a ATAC-seq datasets' , action = 'store_true' , default = None )
1820parser .add_argument ('--splice' , help = 'Remove splice sites based on cigar string when constructing image' , action = 'store_true' , default = None )
1921parser .add_argument ('-p' , type = int , nargs = 1 , help = 'Number of processes, 1 by default' , dest = 'processes' , default = None )
@@ -24,7 +26,7 @@ parser.add_argument('--r2', help='Use read 2 for allocation procedure instead of
2426parser .add_argument ('--readcount' , help = 'CNN will not be used in allocation, only read counts' , action = 'store_true' , default = None )
2527parser .add_argument ('--random' , help = 'Reads will be randomly assigned (similar to Bowtie and BWA on default)' , action = 'store_true' , default = None )
2628parser .add_argument ('--ignore' , help = 'Ignore warnings about read sorting' , action = 'store_true' , default = None )
27- parser .add_argument ('--parser' , help = 'Ignore warnings about read sorting ' , action = 'store_true' , default = None )
29+ parser .add_argument ('--parser' , help = 'Parse alignment files to extract uniquely and multi-mapped reads ' , action = 'store_true' , default = None )
2830args = parser .parse_args ()
2931
3032#Imports
@@ -56,7 +58,8 @@ def cat(files, outname):
5658##Main Method##
5759if __name__ == '__main__' :
5860
59- print ("\n Running Allo version 1.1\n \n " )
61+ print ("\n Running Allo version " + version + "\n \n " )
62+
6063
6164 #Make a folder to store all temp files in allo
6265 ids = str (randint (0 , 10000 ))
@@ -110,6 +113,9 @@ if __name__ == '__main__':
110113 seq = 1
111114 elif args .seq [0 ] == "pe" :
112115 seq = 0
116+ else :
117+ print ("Unknown or missing sequencing type: " + seq )
118+ sys .exit (0 )
113119 #Options for probabilities
114120 if args .readcount is not None :
115121 rc = 1
0 commit comments