public class FastqToSam extends CommandLineProgram
Modifier and Type | Field and Description |
---|---|
java.lang.Boolean |
ALLOW_AND_IGNORE_EMPTY_LINES |
java.util.List<java.lang.String> |
COMMENT |
java.lang.String |
DESCRIPTION |
java.io.File |
FASTQ |
java.io.File |
FASTQ2 |
java.lang.String |
LIBRARY_NAME |
int |
MAX_Q |
int |
MIN_Q |
java.io.File |
OUTPUT |
java.lang.String |
PLATFORM |
java.lang.String |
PLATFORM_MODEL |
java.lang.String |
PLATFORM_UNIT |
java.lang.Integer |
PREDICTED_INSERT_SIZE |
java.lang.String |
PROGRAM_GROUP |
htsjdk.samtools.util.FastqQualityFormat |
QUALITY_FORMAT |
java.lang.String |
READ_GROUP_NAME |
htsjdk.samtools.util.Iso8601Date |
RUN_DATE |
java.lang.String |
SAMPLE_NAME |
java.lang.String |
SEQUENCING_CENTER |
htsjdk.samtools.SAMFileHeader.SortOrder |
SORT_ORDER |
java.lang.Boolean |
STRIP_UNPAIRED_MATE_NUMBER |
boolean |
USE_SEQUENTIAL_FASTQS |
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 |
---|---|
htsjdk.samtools.SAMFileHeader |
createSamFileHeader()
Creates a simple header with the values provided on the command line.
|
protected java.lang.String[] |
customCommandLineValidation()
Put any custom command-line validation in an override of this method.
|
static htsjdk.samtools.util.FastqQualityFormat |
determineQualityFormat(htsjdk.samtools.fastq.FastqReader reader1,
htsjdk.samtools.fastq.FastqReader reader2,
htsjdk.samtools.util.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(htsjdk.samtools.fastq.FastqReader freader1,
htsjdk.samtools.fastq.FastqReader freader2,
htsjdk.samtools.SAMFileWriter writer)
More complicated method that takes two fastq files and builds pairing information in the SAM.
|
protected int |
doUnpaired(htsjdk.samtools.fastq.FastqReader freader,
htsjdk.samtools.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 java.util.List<java.io.File> |
getSequentialFileList(java.io.File baseFastq)
Get a list of FASTQs that are sequentially numbered based on the first (base) fastq.
|
static void |
main(java.lang.String[] argv)
Stock main method.
|
void |
makeItSo(htsjdk.samtools.fastq.FastqReader reader1,
htsjdk.samtools.fastq.FastqReader reader2,
htsjdk.samtools.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 java.io.File FASTQ
@Option(shortName="F2", doc="Input fastq file (optionally gzipped) for the second read of paired end data.", optional=true) public java.io.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 htsjdk.samtools.util.FastqQualityFormat QUALITY_FORMAT
@Option(shortName="RG", doc="Read group name") public java.lang.String READ_GROUP_NAME
@Option(shortName="SM", doc="Sample name to insert into the read group header") public java.lang.String SAMPLE_NAME
@Option(shortName="LB", doc="The library name to place into the LB attribute in the read group header", optional=true) public java.lang.String LIBRARY_NAME
@Option(shortName="PU", doc="The platform unit (often run_barcode.lane) to insert into the read group header", optional=true) public java.lang.String PLATFORM_UNIT
@Option(shortName="PL", doc="The platform type (e.g. illumina, solid) to insert into the read group header", optional=true) public java.lang.String PLATFORM
@Option(shortName="CN", doc="The sequencing center from which the data originated", optional=true) public java.lang.String SEQUENCING_CENTER
@Option(shortName="PI", doc="Predicted median insert size, to insert into the read group header", optional=true) public java.lang.Integer PREDICTED_INSERT_SIZE
@Option(shortName="PG", doc="Program group to insert into the read group header.", optional=true) public java.lang.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 java.lang.String PLATFORM_MODEL
@Option(doc="Comment(s) to include in the merged output file\'s header.", optional=true, shortName="CO") public java.util.List<java.lang.String> COMMENT
@Option(shortName="DS", doc="Inserted into the read group header", optional=true) public java.lang.String DESCRIPTION
@Option(shortName="DT", doc="Date the run was produced, to insert into the read group header", optional=true) public htsjdk.samtools.util.Iso8601Date RUN_DATE
@Option(shortName="SO", doc="The sort order for the output sam/bam file.") public htsjdk.samtools.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 java.lang.Boolean STRIP_UNPAIRED_MATE_NUMBER
public static htsjdk.samtools.util.FastqQualityFormat determineQualityFormat(htsjdk.samtools.fastq.FastqReader reader1, htsjdk.samtools.fastq.FastqReader reader2, htsjdk.samtools.util.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(java.lang.String[] argv)
protected static java.util.List<java.io.File> getSequentialFileList(java.io.File baseFastq)
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
public void makeItSo(htsjdk.samtools.fastq.FastqReader reader1, htsjdk.samtools.fastq.FastqReader reader2, htsjdk.samtools.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(htsjdk.samtools.fastq.FastqReader freader, htsjdk.samtools.SAMFileWriter writer)
protected int doPaired(htsjdk.samtools.fastq.FastqReader freader1, htsjdk.samtools.fastq.FastqReader freader2, htsjdk.samtools.SAMFileWriter writer)
public htsjdk.samtools.SAMFileHeader createSamFileHeader()
protected java.lang.String[] customCommandLineValidation()
CommandLineProgram
customCommandLineValidation
in class CommandLineProgram