public class FastqToSam extends CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, TMP_DIR, VALIDATION_STRINGENCY, VERBOSITY
Constructor and Description |
---|
FastqToSam() |
Modifier and Type | Method and Description |
---|---|
SAMFileHeader |
createSamFileHeader()
Creates a simple header with the values provided on the command line.
|
protected String[] |
customCommandLineValidation()
Put any custom command-line validation in an override of this method.
|
static FastqQualityFormat |
determineQualityFormat(FastqReader reader1,
FastqReader reader2,
FastqQualityFormat expectedQuality)
Looks at fastq input(s) and attempts to determine the proper quality format
Closes the reader(s) by side effect
|
protected int |
doPaired(FastqReader freader1,
FastqReader freader2,
SAMFileWriter writer)
More complicated method that takes two fastq files and builds pairing information in the SAM.
|
protected int |
doUnpaired(FastqReader freader,
SAMFileWriter writer)
Creates a simple SAM file from a single fastq file.
|
protected int |
doWork()
Do the work after command line has been parsed.
|
protected static List<File> |
getSequentialFileList(File baseFastq)
Get a list of FASTQs that are sequentially numbered based on the first (base) fastq.
|
static void |
main(String[] argv)
Stock main method.
|
void |
makeItSo(FastqReader reader1,
FastqReader reader2,
SAMFileWriter writer)
Handles the FastqToSam execution on the FastqReader(s).
|
getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getNestedOptions, getNestedOptionsForHelp, getStandardUsagePreamble, getVersion, instanceMain, instanceMainWithExit, parseArgs, setDefaultHeaders
@Option(shortName="F1", doc="Input fastq file (optionally gzipped) for single end data, or first read in paired end data.") public File FASTQ
@Option(shortName="F2", doc="Input fastq file (optionally gzipped) for the second read of paired end data.", optional=true) public File FASTQ2
@Option(doc="Use sequential fastq files with the suffix <prefix>_###.fastq or <prefix>_###.fastq.gz", optional=true) public boolean USE_SEQUENTIAL_FASTQS
@Option(shortName="V", doc="A value describing how the quality values are encoded in the input FASTQ file. Either Solexa (phred scaling + 66), Illumina (phred scaling + 64) or Standard (phred scaling + 33). If this value is not specified, the quality format will be detected automatically.", optional=true) public FastqQualityFormat QUALITY_FORMAT
@Option(shortName="SM", doc="Sample name to insert into the read group header") public String SAMPLE_NAME
@Option(shortName="LB", doc="The library name to place into the LB attribute in the read group header", optional=true) public String LIBRARY_NAME
@Option(shortName="PU", doc="The platform unit (often run_barcode.lane) to insert into the read group header", optional=true) public String PLATFORM_UNIT
@Option(shortName="PL", doc="The platform type (e.g. illumina, solid) to insert into the read group header", optional=true) public String PLATFORM
@Option(shortName="CN", doc="The sequencing center from which the data originated", optional=true) public String SEQUENCING_CENTER
@Option(shortName="PI", doc="Predicted median insert size, to insert into the read group header", optional=true) public Integer PREDICTED_INSERT_SIZE
@Option(shortName="PG", doc="Program group to insert into the read group header.", optional=true) public String PROGRAM_GROUP
@Option(shortName="PM", doc="Platform model to insert into the group header (free-form text providing further details of the platform/technology used)", optional=true) public String PLATFORM_MODEL
@Option(doc="Comment(s) to include in the merged output file\'s header.", optional=true, shortName="CO") public List<String> COMMENT
@Option(shortName="DS", doc="Inserted into the read group header", optional=true) public String DESCRIPTION
@Option(shortName="DT", doc="Date the run was produced, to insert into the read group header", optional=true) public Iso8601Date RUN_DATE
@Option(shortName="SO", doc="The sort order for the output sam/bam file.") public SAMFileHeader.SortOrder SORT_ORDER
@Option(doc="Minimum quality allowed in the input fastq. An exception will be thrown if a quality is less than this value.") public int MIN_Q
@Option(doc="Maximum quality allowed in the input fastq. An exception will be thrown if a quality is greater than this value.") public int MAX_Q
@Option(doc="If true and this is an unpaired fastq any occurrence of \'/1\' will be removed from the end of a read name.") public Boolean STRIP_UNPAIRED_MATE_NUMBER
public static FastqQualityFormat determineQualityFormat(FastqReader reader1, FastqReader reader2, FastqQualityFormat expectedQuality)
reader1
- The first fastq inputreader2
- The second fastq input, if necessary. To not use this input, set it to nullexpectedQuality
- If provided, will be used for sanity checking. If left null, autodetection will occurpublic static void main(String[] argv)
protected static List<File> getSequentialFileList(File baseFastq)
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
public void makeItSo(FastqReader reader1, FastqReader reader2, SAMFileWriter writer)
reader1
- The FastqReader for the first fastq filereader2
- The second FastqReader if applicable. Pass in null if only using a single readerwriter
- The SAMFileWriter where the new SAM file is writtenprotected int doUnpaired(FastqReader freader, SAMFileWriter writer)
protected int doPaired(FastqReader freader1, FastqReader freader2, SAMFileWriter writer)
public SAMFileHeader createSamFileHeader()
protected String[] customCommandLineValidation()
CommandLineProgram
customCommandLineValidation
in class CommandLineProgram