def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog <-g genome_fasta> <-1 first fastq file> [ -2 second fastq file -n sample_name]""" description = """This script will align read in Sanger fastq format to a reference genome and create a bam file. using bwa and samtools""" prog_version=utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v"+prog_version,description=description,usage=usage,add_help_option=False) optparser.add_option("-h","--help",action="help",help="show this help message and exit.") optparser.add_option("-g","--genome_file",dest="genome_file",type="string", help="Path to a fasta file where the genome is located. Default: %default") optparser.add_option("-1","--fastq1",dest="fastq_file1",type="string", help="Path to the first fastq file where the first reads are. This file is mandatory. Default: %default") optparser.add_option("-2","--fastq2",dest="fastq_file2",type="string", help="Path to the second fastq file where the second reads are. This file is optional. Default: %default") optparser.add_option("-o","--output_dir",dest="output_dir",type="string", help="The path to the directory where the results will be output. If not set, the results will be put in the same folder as fastq1. Default: %default") optparser.add_option("-n","--name",dest="name",type="string", help="The name of the sample currently being aligned. Default: %default") optparser.add_option("-t", "--thread",dest="thread",type='int',default=1, help="Number of thread used by the alignment algorithm. Default: %default") optparser.add_option("--illumina",dest="illumina",action='store_true',default=False, help="the fastq file are in illumina 1.3-1.6 fastq format. Default: %default") optparser.add_option("--print",dest="print_commands",action='store_true',default=False, help="Print the command instead of running them. Default: %default") optparser.add_option("--fifo",dest="fifo",action='store_true',default=False, help="Use fifo to avoid writing big temp file to the disk. Default: %default") optparser.add_option("-r", "--readgroup",dest="read_group",type="string",help="Set read group for SAM file:\n"+"Example: RG\tID:uid\tSM:sample\tPL:Illumina\n") return optparser
def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog -b <bam_file>""" description = """This script will remove duplicate from a bam file based on the first read reference and the second read sequence.""" prog_version=utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v"+prog_version,description=description,usage=usage,add_help_option=False) optparser.add_option("-h","--help",action="help",help="show this help message and exit.") optparser.add_option("-b","--input_bam",dest="input_bam",type="string", help="Path to input bam file. Default: %default") return optparser
def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog -b <bam_file>""" description = """This script will remove duplicate from a bam file based on the first read reference and the second read sequence.""" prog_version = utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v" + prog_version, description=description, usage=usage, add_help_option=False) optparser.add_option("-h", "--help", action="help", help="show this help message and exit.") optparser.add_option("-b", "--input_bam", dest="input_bam", type="string", help="Path to input bam file. Default: %default") return optparser
def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog <-g genome_fasta> <-1 first fastq file> [ -2 second fastq file -n sample_name]""" description = """This script will align read in Sanger fastq format to a reference genome and create a bam file. using bwa and samtools""" prog_version=utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v"+prog_version,description=description,usage=usage,add_help_option=False) optparser.add_option("-h","--help",action="help",help="show this help message and exit.") optparser.add_option("-g","--genome_file",dest="genome_file",type="string", help="Path to a fasta file where the genome is located. Default: %default") optparser.add_option("-1","--fastq1",dest="fastq_file1",type="string", help="Path to the first fastq file where the first reads are. This file is mandatory. Default: %default") optparser.add_option("-2","--fastq2",dest="fastq_file2",type="string", help="Path to the second fastq file where the second reads are. This file is optional. Default: %default") optparser.add_option("-o","--output_dir",dest="output_dir",type="string", help="The path to the directory where the results will be output. If not set, the results will be put in the same folder as fastq1. Default: %default") optparser.add_option("-n","--name",dest="name",type="string", help="The name of the sample currently being aligned. Default: %default") optparser.add_option("-s", "--sort",dest="sort",action='store_true',default=False, help="Sort the bam file by coordinates at the end of the alignment. Default: %default") optparser.add_option("-t", "--thread",dest="thread",type='int',default=1, help="Number of thread used by the alignment algorithm. Default: %default") optparser.add_option("--illumina",dest="illumina",action='store_true',default=False, help="the fastq file are in illumina 1.3-1.6 fastq format. Default: %default") optparser.add_option("--print",dest="print_commands",action='store_true',default=False, help="Print the command instead of running them. Default: %default") help_rna_seq="%s --> increase the maximum insert size to 20kb.\n"%(ANALYSIS_RNA_SEQ) help_digit_transc="%s --> prevent any gap in the tag.\n"%(ANALYSIS_DIGITAL_TRANSC) optparser.add_option("--analysis",dest="analysis",type="string",default=None, help="Set analysis specific parameters:\n"+help_rna_seq+help_digit_transc+"Default: %default") optparser.add_option("-r", "--readgroup",dest="read_group",type="string",help="Set read group for SAM file:\n"+"Example: RG\tID:uid\tSM:sample\tPL:Illumina\n") return optparser
def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog <-g genome_fasta> <-1 first fastq file> [ -2 second fastq file -n sample_name]""" description = """This script will align read in Sanger fastq format to a reference genome and create a bam file. using bwa and samtools""" prog_version = utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v" + prog_version, description=description, usage=usage, add_help_option=False) optparser.add_option("-h", "--help", action="help", help="show this help message and exit.") optparser.add_option( "-g", "--genome_file", dest="genome_file", type="string", help= "Path to a fasta file where the genome is located. Default: %default") optparser.add_option( "-1", "--fastq1", dest="fastq_file1", type="string", help= "Path to the first fastq file where the first reads are. This file is mandatory. Default: %default" ) optparser.add_option( "-2", "--fastq2", dest="fastq_file2", type="string", help= "Path to the second fastq file where the second reads are. This file is optional. Default: %default" ) optparser.add_option( "-o", "--output_dir", dest="output_dir", type="string", help= "The path to the directory where the results will be output. If not set, the results will be put in the same folder as fastq1. Default: %default" ) optparser.add_option( "-n", "--name", dest="name", type="string", help="The name of the sample currently being aligned. Default: %default" ) optparser.add_option( "-s", "--sort", dest="sort", action='store_true', default=False, help= "Sort the bam file by coordinates at the end of the alignment. Default: %default" ) optparser.add_option( "-t", "--thread", dest="thread", type='int', default=1, help= "Number of thread used by the alignment algorithm. Default: %default") optparser.add_option( "--illumina", dest="illumina", action='store_true', default=False, help= "the fastq file are in illumina 1.3-1.6 fastq format. Default: %default" ) optparser.add_option( "--print", dest="print_commands", action='store_true', default=False, help="Print the command instead of running them. Default: %default") help_rna_seq = "%s --> increase the maximum insert size to 20kb.\n" % ( ANALYSIS_RNA_SEQ) help_digit_transc = "%s --> prevent any gap in the tag.\n" % ( ANALYSIS_DIGITAL_TRANSC) optparser.add_option("--analysis", dest="analysis", type="string", default=None, help="Set analysis specific parameters:\n" + help_rna_seq + help_digit_transc + "Default: %default") optparser.add_option("-r", "--readgroup", dest="read_group", type="string", help="Set read group for SAM file:\n" + "Example: RG\tID:uid\tSM:sample\tPL:Illumina\n") return optparser
def _prepare_optparser(): """Prepare optparser object. New options will be added in this function first. """ usage = """usage: %prog <-g genome_fasta> <-1 first fastq file> [ -2 second fastq file -n sample_name]""" description = """This script will align read in Sanger fastq format to a reference genome and create a bam file. using bwa and samtools""" prog_version = utils.getWtss_version() optparser = OptionParser(version="%prog of wtss_pipeline v" + prog_version, description=description, usage=usage, add_help_option=False) optparser.add_option("-h", "--help", action="help", help="show this help message and exit.") optparser.add_option( "-g", "--genome_file", dest="genome_file", type="string", help= "Path to a fasta file where the genome is located. Default: %default") optparser.add_option( "-1", "--fastq1", dest="fastq_file1", type="string", help= "Path to the first fastq file where the first reads are. This file is mandatory. Default: %default" ) optparser.add_option( "-2", "--fastq2", dest="fastq_file2", type="string", help= "Path to the second fastq file where the second reads are. This file is optional. Default: %default" ) optparser.add_option( "-o", "--output_dir", dest="output_dir", type="string", help= "The path to the directory where the results will be output. If not set, the results will be put in the same folder as fastq1. Default: %default" ) optparser.add_option( "-n", "--name", dest="name", type="string", help="The name of the sample currently being aligned. Default: %default" ) optparser.add_option( "-t", "--thread", dest="thread", type='int', default=1, help= "Number of thread used by the alignment algorithm. Default: %default") optparser.add_option( "--illumina", dest="illumina", action='store_true', default=False, help= "the fastq file are in illumina 1.3-1.6 fastq format. Default: %default" ) optparser.add_option( "--print", dest="print_commands", action='store_true', default=False, help="Print the command instead of running them. Default: %default") optparser.add_option( "--fifo", dest="fifo", action='store_true', default=False, help= "Use fifo to avoid writing big temp file to the disk. Default: %default" ) optparser.add_option("-r", "--readgroup", dest="read_group", type="string", help="Set read group for SAM file:\n" + "Example: RG\tID:uid\tSM:sample\tPL:Illumina\n") return optparser