def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-string", dest="filein", metavar="FILEIN", help="Input file can be in format like <xls:a.xls,pdf:a.pdf,png:a.png,bw:a.bw,legend:a.legend (no , or : or ; allowed in legend);xls:b.xls,pdf:b.pdf;bw:c.bw,legend:c.legend>. <;> separates each sample which will be saved in one independent dict. <,> separates each file. <:> separate file type and file name which will be treated as a key-value pair.") #parser.add_option("-t", "--type", dest="type", # metavar="FILEIN", help="Type for each part of input file like <xls> or <xls;pdf> relative to different input format.") parser.add_option("-T", "--title", dest="title", help="Document title with well number at the beginning to specify the header level. Currently only first level header supported.") parser.add_option("-d", "--description", dest="description", help="A paragraph in markdown format to describe this part of analysis.") parser.add_option("-t", "--tag", dest="tag", help="A unique string to label this part of analysis, only alphabets accepted.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="Any legal FASTA file.") parser.add_option("-l", "--max-len", dest="max_len", metavar="MAX_ALLOWED_LENGTH", help="An integer number \ to set the maximum allowed length for each sequence line.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) desc = "" usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A fasta file, all strings all > will \ be treated as sequence names.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--go-anno-file", dest="go", metavar="go", help="The gene ontology file containing 3 columns. The first two columns will be used together and can be any annotation or any string when empty. The third column must be gene name with each one line.") parser.add_option("-t", "--annoType", dest="annoType", default="Anno", help="Any string like BP, MF, CC or KEGG, Reactome represents what type of annotation used.") parser.add_option("-g", "--gene", dest="gene", metavar="gene", help="One column gene list file or two columns with additional group column for each gene.") parser.add_option("-p", "--pvalue", dest="pvalue", default=0.05, metavar="pvalue", help="pvalue for enriched terms. Default 0.05.") parser.add_option("-o", "--output", dest="output", help="Prefix for output files. If there are 2 columns in gene list file, the second column will be used as a tag for output filename. If there are annotations from different databases (4 columsn in annotation file), db names will be used as a tag for output filename also.") parser.add_option("-P", "--toptermsPlot", dest="topPlot", default = 0, type="int", help="Specify number of top items for enrichment plot. Default 0. Accept integers like 20.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.go != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--gtf-file", dest="filein", metavar="FILEIN", help="GTF file") parser.add_option("-b", "--bed12", dest="bed12", help="GTF transfferred BED12 file") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A network file containing at least \ two columns separated by tab with each represeent a list of paired genes.") parser.add_option("-U", "--upstream-list", dest="up_file", help="The file contains upstream genes .") parser.add_option("-D", "--downstream-list", dest="dw_file", help="The file contains downstream genes.") parser.add_option("-u", "--upstream-col", dest="up_col", help="The column contains upstream genes (1-based).") parser.add_option("-d", "--downstream-col", dest="dw_col", help="The column contains downstream genes (1-based).") parser.add_option("-r", "--relationship-col", dest="re_col", help="The column contains relationships (1-based). \ If not given, a '--' will be used to represent relationships.") parser.add_option("-H", "--header", dest="header", default=1, help="The number of header lines to skip, \ default 1.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A gff3 or gtf file with format specified above. Multiple genes can be included.") parser.add_option("-c", "--coordinate", dest="coordinate", help="Supply gene coordinate in format like <chr:start:end:strand:name>. \ Multiple coordinates separated by ';' are accepted. [The meaning of <start> and <end> ] \ is same as in gff file. 1-based, end not included.") parser.add_option("-b", "--bamFiles", dest="bamFiles", help="BAM files to be used in format like <samp1_1.bam,samp1_2.bam;samp2_1.bam;samp3_1.bam,samp3_2.bam,samp3_3.bam>. ") parser.add_option("-l", "--bamLabels", dest="bamLabels", help="Labels for BAM files given to -b in format like <samp1_1,samp1_2;samp2_1;samp3_1,samp3_2,samp3_3>. ") parser.add_option("-r", "--total-mapped-reads-count", dest="readsCnt", help="Total mapped reads count used for normalize BAM counts in format like <10000,10001;10010;10020,10021,10019>. ") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="go.obo") #parser.add_option("-n", "--number", dest="number", # type="int", help="Supply an int number") #parser.add_option("-c", "--choice", dest="choice", # type="choice", choices=["a", "b", "c"], # default="a", help="Supply an int number") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A matrix with first row as header and \ first column as row names. The results will be output to files.") parser.add_option("-r", "--row", dest="row_correlation", default=False, action="store_true", help="Default perform column correlation. \Specify to compute row correlation.") parser.add_option("-l", "--log2-transform", dest="log2_trans", default=False, action="store_true", help="Perform log2 transform before computing pearson correlation value. A pseudo count 1 will be added before log2 transform.") parser.add_option("-m", "--method", dest="method", default="pearson", help="pearson (default), kendall, spearman") #parser.add_option("-s", "--scale", dest="scale", # default=False, action="store_true" help="Specify to scale data before correlation analysis. For row_correlation, scale will be perfomed on columns. For column correlation, scale will be performed on rows.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A FASTA file.") parser.add_option("-o", "--order-file", dest="order_file", metavar="ORDER_FILE", help="Only given when you want to sort \ FASTA file as this order. This file contains the names of FATSA \ sequence in files given to -i. ") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file_fastqc.html" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="The HTML output of fastqc.") parser.add_option( "-a", "--adaptor", dest="adaptor", default="/MPATHB/soft/FastQC/Configuration/fastqc_adaptor.fa", help="A two column file containing the adaptor sequences used \ by fastq. Default: /MPATHB/soft/FastQC/Configuration/fastqc_adaptor.fa") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A text file containing blog text") parser.add_option("-s", "--stopwords", dest="stopwords", default="/home/ct/blog/tong-chen.github.com/_posts/stopwords", help="A file containing words to be ignored. One each row. Default system default.") parser.add_option("-p", "--pic", dest="pic", default="~/blog/tong-chen.github.com/_posts/logo_mode.png", help="A picture to be moded on. Default system default.") parser.add_option("-w", "--words-extra", dest="words", help="SPecial words to be added to input file to weight it. In format like <airflow:30;docker:40> meaning add 30 airflow words and 40 docker words.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option( "-i", "--input-file", dest="filein", metavar="FILEIN", help= "comma separated list of institutes. Currently support IGDB, IOZ, IB") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="Gene expression matrix with first \ column representing gene names and first row as header lines.") parser.add_option("-o", "--operation", dest="op", default='average', help="The way to deal with \ duplicate expressions, default average meaning get the average \ expression of all probes. Accept <max> to keep the probe with the \ biggest difference, and <min> to keep the probe with the \ smalllest difference.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) desc = "" usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A standard bed file with \ six columns. Strand information will be considered. \ Extra columns will be ignored.") parser.add_option("-n", "--number-bins", dest="nBins", metavar="20", default="20", help="The numbers bins in regions") parser.add_option("-s", "--strand", dest="strand", default=1, help="Consider strand information or not. \ Default TRUE. Strings or numbers that represent FALSE can turn \ off this parameter.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="File waiting for sort") parser.add_option("-c", "--sort-col", dest="sort_col", type="int", default=1, help="Specify the column to sort on. Default 1 meaning sort file on the first column.") parser.add_option("-n", "--number-head", dest="num_head", type="int", default=1, help="Specify the number of headlines to skip.") parser.add_option("-o", "--order-file", dest="order_file", help="The file containing ordered lists (one in each line).") parser.add_option("-C", "--order-col", dest="order_col", type="int", default=1, help="Specify the column in <order_file> used for sort <input-file>. Default 1 meaning used the first column.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print(desc, file=sys.stderr) cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="Short summary") parser.add_option("-o", "--output-file", dest="op_prefix", metavar="FILEIN", help="Output file") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="BLAST OUTPUT in JSON format.") parser.add_option("-o", "--output", dest="output_fmt", default='ACCESSION', help="Output accession (default, ACCESSION) \ or FASTA sequences (FASTA).") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="Output of compareMotifs.pl") parser.add_option("-n", "--number-motif", dest="number", metavar="NUM", help="The number of motifs you generated \ for each simulation. Since generated motifs will be done similarity \ check between each other, you may not get so many motifs sometimes.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="The output of s-plot heatmapS or kmeans.test.sh. \ Generally a data matrix with the first column as rownames and \ the last column as cluster info is acceptable.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="Cuffcompare or cufflink GTF. \ Any type of GTF would suitable. The GTF should be sorted by \ transcript name.") parser.add_option("-t", "--translate-gtf", dest="trans", help="Normally GTFs generated by transdecoder. Each transcript \ will be treated as a scaffold.") parser.add_option("-c", "--correct", dest="correct", default=1, help="Correct the pep file, cds file (fasta format) generated \ by Transdecoder according to the strand of transcripts. \ Since come transcripts assembled using cufflinks have no direction \ information, we run Transdecoder in non-strand mode. \ Here we only select direct translation of transcripts \ which direction is known in cufflink GTFs. \ Default 1 meaning execute correction. Accept 0 to turn this off.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="The FASTA file") parser.add_option("-s", "--separator", dest="sep", default="IdoNotThinkThisWillAppear, DoyouThinkSo", metavar="SEPARATOR", help="The separator used to get ID names. \ Default full line except leading > and trailing '\n' is \ used as ID names.") parser.add_option("-F", "--first-x-words", dest="count", default=1, help="Default 1 means extracting the first \ word before separator. Accept other number (x) to extract the \ first x words.") parser.add_option("-n", "--name-list", dest="name", help="One column file contains ID lists.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-c", "--compare-summary", dest="compare_summary", default="binC0304YCnt.merge/SCX.binC0304YCnt.merge.all.DE.summary.xls", help="File name for summary.xls output by multipleSampleCompare_summary.py. One special symbol <C0304Y> should be put at the bin-size position. For example, file <bin10000Cnt.merge/SCX.bin10000Cnt.merge.all.DE.summary.xls> should be <binC0304YCnt.merge/SCX.binC0304YCnt.merge.all.DE.summary.xls> (which is default). The program will replace <C0304Y> with given bin sizes.") parser.add_option("-m", "--meltBinRegion", dest="meltBinRegion", default="binC0304YCnt.merge/binC0304YCnt.merge.norm.chr_distrib.summary.xls", help="File name for summary.xls output by meltRegionBinMatrix.py. One special symbol <C0304Y> should be put at the bin-size position. For example, file <bin10000Cnt.merge/bin10000Cnt.merge.norm.chr_distrib.summary.xls> should be <binC0304YCnt.merge/binC0304YCnt.merge.norm.chr_distrib.summary.xls> (which is default). The program will replace <C0304Y> with given bin sizes. Specifally giving <no> to ignore this part analysis.") parser.add_option("-b", "--bin-size", dest="bin_size", help="Bin size. Multiple sizes can be separated by < > or <,>.") parser.add_option("-t", "--tag", dest="tag", help="An unique string with only alohabets to label all labels in output Rmd.") #parser.add_option("-o", "--output-prefix", dest="out_prefix", # help="The prefix of output files.") parser.add_option("-r", "--report-dir", dest="report_dir", default='report', help="Directory for report files. Default 'report'.") parser.add_option("-R", "--report-sub-dir", dest="report_sub_dir", default='4_genome_bin_difference', help="Directory for saving report figures and tables. This dir will put under <report_dir>, so only dir name is needed. Default '4_genome_bin_difference'.") #parser.add_option("-d", "--doc-only", dest="doc_only", # default=False, action="store_true", help="Specify to only generate doc.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.bin_size != None, "A string needed for -b" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-n", "--nafold-det", dest="det", metavar="NAFOLD.DET", help="The det file outputed from nafold. \ Normaly you can run nafold through wrapped nafold.pl.") parser.add_option("-m", "--map-file", dest="map", metavar="DAT.MAP", help="The parsed miRNA.dat file though \ parsemirBase.py. This is used to map miRNAs to pre-miRNAs.") parser.add_option("-s", "--subset-file", dest="sub", metavar="SUB", help="A file containing only part of \ miRNAs.[Unsupported]") parser.add_option("-a", "--all-pos-status", dest="all_status", metavar="TRUE", help="Return the pairing status of all \ positions. Default FALSE") parser.add_option("-p", "--position", dest="pos", metavar="POS", help="The positions you want to check. \ Accept discrete numbers like '1,2,4,6' or a range '1-5' or both. \ All mentioned numbers and internal numbers will be included and \ treated as 1-based from 5' end of miRNAs.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.det != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="The FASTA file") parser.add_option("-s", "--separator", dest="sep", default="IdoNotThinkThisWillAppear, DoyouThinkSo", metavar="SEPARATOR", help="The separator used to get ID names. \ Default full line (no splitting) except leading > and trailing '\\n' is \ used as ID names. Please use <tab> to specify '\\t' as separtor.") parser.add_option("-F", "--first-x-words", dest="count", default=1, help="Default 1 means extracting the first \ word before separator. Accept other number (x) to extract the \ first x words.") parser.add_option("-n", "--name-list", dest="name", help="One or several columns file containing ID lists in one column.") parser.add_option("-c", "--name-col-index", dest="name_col_ix", default=1, type='int', help="Specify the columns containing IDs. Default 1 representing the first column.") parser.add_option("-r", "--rename-col-index", dest="rename_col_ix", default=0, type='int', help="Specify the columns containing IDs. Default 0 representing no rename.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file -b bedfile" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="The input file should contain \ at least three columns with the first column as the name in \ the forth column given to -b.") parser.add_option("-b", "--bed", dest="bed", help="The bed file contains the coordinates of \ sequences used for short motif search. Six column file with \ strand information needed.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >> sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="file given to clusterProfileGO.sh.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-o", "--output-folder", dest="output", metavar="FILEIN", help="The directory to save output files.") parser.add_option("-t", "--title", dest="title", metavar="TITLE", help="Title for document.") parser.add_option("-a", "--author-list", dest="author", metavar="AUTHOR", help="Author or affilication or other information. \ Multiple items separated by <;> can be given here.") parser.add_option("-d", "--document-class", dest="doc_class", default="article", help="Document class, article, book, report. Default [article]") parser.add_option("-l", "--latex-template", dest="latex_temp", default="null", help="A file to set latex output template. [Optional]") parser.add_option("-b", "--bibliography", dest="bib", help="Bibliography files for reference citation. Nomally these files can be got from EndNote or Zotero. Multiple files should be supplied as <1.bib, 2.bib>.") parser.add_option("-B", "--biblio-style", dest="bib_style", default="apalike", help="Bibliography style for reference citation. Default <apalike>.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-D", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.output != None, "A filename needed for -o" return (options, args)
def cmdparameter(argv): if len(argv) == 1: global desc print >>sys.stderr, desc cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) usages = "%prog -i file" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="A multiple aignment FASTA file") parser.add_option("-m", "--multiple-aligned-fasta", dest="msa", default='phylip', help="Specify the type of given \ multiple alignment file.Currently <phylip>(default) or <fasta> \ is acccepted. ") parser.add_option("-g", "--gap-keep", dest="gap_keep", default=1, type='int', help="Keep sites with gaps (default).\ Accept <0> to delete sites with gaps.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, action="store_true", help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)
def cmdparameter(argv): if len(argv) == 1: cmd = 'python ' + argv[0] + ' -h' os.system(cmd) sys.exit(1) desc = "" usages = "%prog -i homer_out -b bed_used_for_findMotif -t RNA" parser = OP(usage=usages) parser.add_option("-i", "--input-file", dest="filein", metavar="FILEIN", help="This is the output of \ findMotifsGenome.pl or findMotifs.pl when using -find. ") parser.add_option("-b", "--bed-file", dest="bedin", metavar="inputBed", help="The original bed file which has been given to \ findMotifsGenome.pl and used to get the file given to -i. If -t is \ RNA, an at least six-column file is needed. If -t is DNA, an at-leat \ four-column file is needed. Other columns will be ignored. \ If you run findMotifsGenome.pl using -size 200 or other parameters \ rather than <-size given>, you may need the real bed which \ findMotifsGenome.pl used. ") parser.add_option("-t", "--type", dest="type", default='RNA', help="The attribute of given bed file \ represented sequences. For <DNA>, the strand information of regions in \ output bed file is accordant with output file of findMotifsGenome.pl. \ For <RNA>, the strand information of one region is accordant with its \ strand information in file given to -b.") parser.add_option("-H", "--header", dest="header", default=1, help="The number of header lines to skip.") parser.add_option("-v", "--verbose", dest="verbose", default=0, help="Show process information") parser.add_option("-d", "--debug", dest="debug", default=False, help="Debug the program") (options, args) = parser.parse_args(argv[1:]) assert options.filein != None, "A filename needed for -i" return (options, args)