Category

Sam/Bam Manipulation


Usage

java -jar picard.jar FilterSamReads I=input.bam O=output.bam READ_LIST_FILE=read_names.txt FILTER=filter_value


Manual

INPUT (File)    The SAM or BAM file that will be filtered. Required.
FILTER (Filter)    Filter. Required. Possible values: {includeAligned [OUTPUT SAM/BAM will contain aligned reads only. INPUT SAM/BAM must be in queryname SortOrder. (Note that *both* first and second of paired reads must be aligned to be included in the OUTPUT SAM or BAM)], excludeAligned [OUTPUT SAM/BAM will contain un-mapped reads only. INPUT SAM/BAM must be in queryname SortOrder. (Note that *both* first and second of pair must be aligned to be excluded from the OUTPUT SAM or BAM)], includeReadList [OUTPUT SAM/BAM will contain reads that are supplied in the READ_LIST_FILE file], excludeReadList [OUTPUT bam will contain reads that are *not* supplied in the READ_LIST_FILE file], includeJavascript [OUTPUT bam will contain reads that hava been accepted by the JAVASCRIPT_FILE script.], includePairedIntervals [OUTPUT SAM/BAM will contain any reads (and their mate) that overlap with an interval. INPUT SAM/BAM and INTERVAL_LIST must be in coordinate SortOrder. Only aligned reads will be output.]}
READ_LIST_FILE (File)    Read List File containing reads that will be included or excluded from the OUTPUT SAM or BAM file. Default value: null.
INTERVAL_LIST (File)    Interval List File containing intervals that will be included or excluded from the OUTPUT SAM or BAM file. Default value: null.
SORT_ORDER (SortOrder)    SortOrder of the OUTPUT SAM or BAM file, otherwise use the SortOrder of the INPUT file. Default value: null. Possible values: {unsorted, queryname, coordinate, duplicate}
WRITE_READS_FILES (Boolean)    Create .reads files (for debugging purposes) Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
OUTPUT (File)    SAM or BAM file to write read excluded results to Required.
JAVASCRIPT_FILE (File)    Filters a SAM or BAM file with a javascript expression using the java javascript-engine. The script puts the following variables in the script context: 'record' a SamRecord ( https://samtools.github.io/htsjdk/javadoc/htsjdk/htsjdk/samtools/SAMRecord.html ) and 'header' a SAMFileHeader ( https://samtools.github.io/htsjdk/javadoc/htsjdk/htsjdk/samtools/SAMFileHeader.html ). Last value of the script should be a boolean to tell wether we should accept or reject the record. Default value: null.


Share your experience or ask a question