Package picard.sam
Class CreateSequenceDictionary
java.lang.Object
picard.cmdline.CommandLineProgram
picard.sam.CreateSequenceDictionary
Create a SAM/BAM file from a fasta containing reference sequence. The output SAM file contains a header but no
SAMRecords, and the header contains only sequence records.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
boolean
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
Use reference filename to create URI to go into header if URI was not passed on cmd line.protected int
doWork()
Do the work after command line has been parsed.protected ReferenceArgumentCollection
htsjdk.samtools.SAMSequenceDictionary
makeSequenceDictionary
(File referenceFile) Read all the sequences from the given reference file, and convert into SAMSequenceRecordsMethods inherited from class picard.cmdline.CommandLineProgram
checkRInstallation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
Field Details
-
OUTPUT
@Argument(doc="Output SAM file containing only the sequence dictionary. By default it will use the base name of the input reference with the .dict extension", shortName="O", optional=true) public PicardHtsPath OUTPUT -
GENOME_ASSEMBLY
@Argument(shortName="AS", doc="Put into AS field of sequence dictionary entry if supplied", optional=true) public String GENOME_ASSEMBLY -
URI
@Argument(shortName="UR", doc="Put into UR field of sequence dictionary entry. If not supplied, input reference file is used", optional=true) public String URI -
SPECIES
@Argument(shortName="SP", doc="Put into SP field of sequence dictionary entry", optional=true) public String SPECIES -
TRUNCATE_NAMES_AT_WHITESPACE
@Argument(doc="Make sequence name the first word from the > line in the fasta file. By default the entire contents of the > line is used, excluding leading and trailing whitespace.") public boolean TRUNCATE_NAMES_AT_WHITESPACE -
NUM_SEQUENCES
@Argument(doc="Stop after writing this many sequences. For testing.") public int NUM_SEQUENCES -
ALT_NAMES
@Argument(shortName="AN", doc="Optional file containing the alternative names for the contigs. Tools may use this information to consider different contig notations as identical (e.g: \'chr1\' and \'1\'). The alternative names will be put into the appropriate @AN annotation for each contig. No header. First column is the original name, the second column is an alternative name. One contig may have more than one alternative name.", optional=true) public File ALT_NAMES
-
-
Constructor Details
-
CreateSequenceDictionary
public CreateSequenceDictionary()
-
-
Method Details
-
makeSequenceDictionary
Read all the sequences from the given reference file, and convert into SAMSequenceRecords- Parameters:
referenceFile
- fasta or fasta.gz- Returns:
- SAMSequenceRecords containing info from the fasta, plus from cmd-line arguments.
-
customCommandLineValidation
Use reference filename to create URI to go into header if URI was not passed on cmd line.- 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.
-
makeReferenceArgumentCollection
- Overrides:
makeReferenceArgumentCollection
in classCommandLineProgram
-
doWork
protected int doWork()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.
-