Package picard.fastq
Class BamToBfq
- java.lang.Object
-
- picard.cmdline.CommandLineProgram
-
- picard.fastq.BamToBfq
-
@DocumentedFeature public class BamToBfq extends CommandLineProgram
Converts a BAM file into a BFQ (binary fastq formatted) file.The BFQ format is the input format to some tools like Maq aligner.
Input
A single BAM file to convert
.Output
One or two FASTQ files depending on whether the BAM file contains single- or paired-end sequencing data. You must indicate the output directory that will contain these files (
ANALYSIS_DIR
) and the output file name prefix (OUTPUT_FILE_PREFIX
).Usage example:
java -jar picard.jar BamToBfq \ I=input.bam \ ANALYSIS_DIR=output_dir \ OUTPUT_FILE_PREFIX=output_name \ PAIRED_RUN=false
-
-
Field Summary
Fields Modifier and Type Field Description File
ANALYSIS_DIR
Integer
BASES_TO_WRITE
boolean
CLIP_ADAPTERS
String
FLOWCELL_BARCODE
Boolean
INCLUDE_NON_PF_READS
File
INPUT
Integer
LANE
String
OUTPUT_FILE_PREFIX
Boolean
PAIRED_RUN
Integer
READ_CHUNK_SIZE
String
READ_NAME_PREFIX
Integer
READS_TO_ALIGN
String
RUN_BARCODE
-
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
-
Constructor Summary
Constructors Constructor Description BamToBfq()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]
customCommandLineValidation()
Put any custom command-line validation in an override of this method.protected int
doWork()
Do the work after command line has been parsed.-
Methods inherited from class picard.cmdline.CommandLineProgram
getCommandLine, getCommandLineParser, getCommandLineParser, getDefaultHeaders, getFaqLink, getMetricsFile, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
-
-
-
Field Detail
-
INPUT
@Argument(doc="The BAM file to parse.", shortName="I") public File INPUT
-
ANALYSIS_DIR
@Argument(doc="The analysis directory for the binary output file. ") public File ANALYSIS_DIR
-
FLOWCELL_BARCODE
@Argument(doc="Flowcell barcode (e.g. 30PYMAAXX). ", shortName="F", mutex="OUTPUT_FILE_PREFIX") public String FLOWCELL_BARCODE
-
LANE
@Argument(doc="Lane number. ", shortName="L", optional=true, mutex="OUTPUT_FILE_PREFIX") public Integer LANE
-
OUTPUT_FILE_PREFIX
@Argument(doc="Prefix for all output files", mutex={"FLOWCELL_BARCODE","LANE"}) public String OUTPUT_FILE_PREFIX
-
READS_TO_ALIGN
@Argument(doc="Number of reads to align (null = all).", shortName="NUM", optional=true) public Integer READS_TO_ALIGN
-
READ_CHUNK_SIZE
@Argument(doc="Number of reads to break into individual groups for alignment", shortName="CHUNK") public Integer READ_CHUNK_SIZE
-
PAIRED_RUN
@Argument(doc="Whether this is a paired-end run. ", shortName="PE") public Boolean PAIRED_RUN
-
RUN_BARCODE
@Argument(doc="Deprecated option; use READ_NAME_PREFIX instead", mutex="READ_NAME_PREFIX", shortName="RB", optional=true) public String RUN_BARCODE
-
READ_NAME_PREFIX
@Argument(doc="Prefix to be stripped off the beginning of all read names (to make them short enough to run in Maq)", optional=true) public String READ_NAME_PREFIX
-
INCLUDE_NON_PF_READS
@Argument(doc="Whether to include non-PF reads", shortName="NONPF", optional=true) public Boolean INCLUDE_NON_PF_READS
-
CLIP_ADAPTERS
@Argument(doc="Whether to clip adapters from the reads") public boolean CLIP_ADAPTERS
-
BASES_TO_WRITE
@Argument(doc="The number of bases from each read to write to the bfq file. If this is non-null, then only the first BASES_TO_WRITE bases from each read will be written.", optional=true) public Integer BASES_TO_WRITE
-
-
Method Detail
-
doWork
protected int doWork()
Description copied from class:CommandLineProgram
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.- Specified by:
doWork
in classCommandLineProgram
- Returns:
- program exit status.
-
customCommandLineValidation
protected String[] customCommandLineValidation()
Description copied from class:CommandLineProgram
Put any custom command-line validation in an override of this method. clp is initialized at this point and can be used to print usage and access argv. Any options set by command-line parser can be validated.- Overrides:
customCommandLineValidation
in classCommandLineProgram
- Returns:
- null if command line is valid. If command line is invalid, returns an array of error message to be written to the appropriate place.
-
-