Running and Verifying Picard
Procedure
- Use PuTTY to log in to the server as the root user.
- Copy the test case files and go to the test directory.
cp B17NC_R1.fq.gz /path/to/TESTCASE cp B17NC_R2.fq.gz /path/to/TESTCASE cp GCA_000001405.15_GRCh38_full_analysis_set.fna.gz /path/to/TESTCASE cd /path/to/TESTCASE
- Decompress the test files.
gzip -d B17NC_R1.fastq.gz gzip -d B17NC_R2.fastq.gz gzip -d GCA_000001405.15_GRCh38_full_analysis_set.fna.gz
- Rename the file to hs38DH.fasta.
mv GCA_000001405.15_GRCh38_full_analysis_set.fna hs38DH.fasta
- Add the BWA environment variable.
export PATH=/path/to/BWA/bwa-0.7.17:$PATH export PLATFORM="Illumina" export RG_ID="L1" export LIB="pt2" export SAMPLE=B17NC
- Process the test case files.
bwa index -a bwtsw hg19.fa bwa mem -t 96 -o B17NC.sam -M -R "@RG\tID:$RG_ID\tPL:$PLATFORM\tSM:$SAMPLE\tCN:$LIB" hg19.fa B17NC_R1.fastq B17NC_R2.fastq
- Use Samtools to convert the format and sort the data.
samtools view -bS B17NC.sam > B17NC.bam samtools sort $SAMPLE.bam $SAMPLE.sort
- Execute the test case.
{ time java -jar picard.jar CollectAlignmentSummaryMetrics R=hs38DH.fasta I=B17NC.sort.bam O=output.txt; } 2>&1 |tee picard.logAfter the execution is complete, the output.txt and picard.log files are generated in the current directory. The output.txt file contains the output and the picard.log file contains the run logs.
Check the value of Elapsed time (in minutes) in the picard.log file. A smaller value indicates higher performance.
Figure 1 is an example of the output result.
Parent topic: Picard 2.23.3 Porting Guide (CentOS 7.6)
