Sam/Bam Manipulation

java -jar picard.jar
Function: Collects hybrid-selection (HS) metrics for a SAM or BAM file. This tool takes a SAM/BAM file input and collects metrics that are specific for sequence datasets generated through hybrid-selection. Hybrid-selection (HS) is the most commonly used technique to capture exon-specific sequences for targeted sequencing experiments such as exome sequencing; for more information, please see the corresponding GATK Dictionary entry.
Usage: java -jar picard.jar CollectHsMetrics I=input.bam O=hs_metrics.txt R=reference_sequence.fasta BAIT_INTERVALS=bait.interval_list TARGET_INTERVALS=target.interval_list
Function: Create index for BAM file
Usage: bamtools index -i <BAM FILE>
java -jar picard.jar CollectRnaSeqMetrics
Function: Produces RNA alignment metrics for a SAM or BAM file.
Usage: java -jar picard.jar CollectRnaSeqMetrics I=input.bam O=output.RNA_Metrics REF_FLAT=ref_flat.txt STRAND=SECOND_READ_TRANSCRIPTION_STRAND RIBOSOMAL_INTERVALS=ribosomal.interval_list
java -jar picard.jar
Function: Merges multiple VCF or BCF files into one VCF file. Input files must be sorted by their contigs and, within contigs, by start position. The input files must have the same sample and contig lists. An index file is created and a sequence dictionary is required by default.
Usage: java -jar picard.jar MergeVcfs
Function: Convert alignments in BAM or SAM format into fastq format.
Usage: -i test_PairedEnd_StrandSpecific_hg19.sam -o bam2fq_out1
java -jar picard.jar
Function: Converts a BED file to a Picard Interval List. This tool provides easy conversion from BED to the Picard interval_list format which is required by many Picard processing tools. Note that the coordinate system of BED files is such that the first base or position in a sequence is numbered "0", while in interval_list files it is numbered "1".BED files contain sequence data displayed in a flexible format that includes nine optional fields, in addition to three required fields within the annotation tracks. The required fields of a BED file include:
Usage: java -jar picard.jar chrom - The name of the chromosome (e.g. chr20) or scaffold (e.g. scaffold10671) chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered "0" chromEnd - The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.
Function: converts BAM to a number of other formats
Usage: bamtools convert -format json -in myData.bam -out myData.json
Function: Summarizing mapping statistics of a BAM or SAM file.
Usage: -i Pairend_nonStrandSpecific_36mer_Human_hg19.bam
java -jar picard.jar
Function: Reverts the original base qualities and adds the mate cigar tag to read-group BAMs.
Usage: java -jar picard.jar RevertOriginalBaseQualitiesAndAddMateCigar
java -jar picard.jar
Function: DEPRECATED: Use CollectHsMetrics instead. Calculates a set of Hybrid Selection specific metrics from an aligned SAMor BAM file. If a reference sequence is provided, AT/GC dropout metrics will be calculated, and the PER_TARGET_COVERAGE option can be used to output GC and mean coverage information for every target.
Usage: java -jar picard.jar CalculateHsMetrics
Function: The command bamtools resolve resolves paired-end reads. The resolving mode is required, and it can be -makeStats, -markPairs, or -twoPass.
Usage: bamtools resolve -twoPass -in input_alignments.bam -out output_alignments.bam
java -jar picard.jar
Function: Compare two metrics files.This tool compares the metrics and histograms generated from metric tools to determine if the generated results are identical. This tool is useful to test and compare outputs when code changes are implemented. It is not meant for use by end-users of this toolkit. The tool's output simply indicates whether two metrics files are equal or not equal.
Usage: java -jar picard.jar CompareMetrics metricfile1.txt metricfile2.txt
java -jar picard.jar
Function: Takes a SAM or BAM file and separates all the reads into one SAM or BAM file per library name. Reads that do not have a read group specified or whose read group does not have a library name are written to a file called 'unknown.' The format (SAM or BAM) of the output files matches that of the input file.
Usage: java -jar picard.jar SplitSamByLibrary
java -jar picard.jar
Function: Collects Illumina Basecalling metrics for a sequencing run.
Usage: java -jar picard.jar CollectIlluminaBasecallingMetrics BASECALLS_DIR=/BaseCalls/ LANE=001 READ_STRUCTURE=25T8B25T INPUT=barcode_list.txt
java -jar picard.jar
Function: Adds comments to the header of a BAM file.This tool makes a copy of the input bam file, with a modified header that includes the comments specified at the command line (prefixed by @CO). Use double quotes to wrap comments that include whitespace or special characters. Note that this tool cannot be run on SAM files.
Usage: java -jar picard.jar AddCommentsToBam I=input.bam O=modified_bam.bam C=comment_1 C="comment 2"