picard CollectAlignmentSummaryMetrics required arguments format
AnsweredHi everyone. I am trying to run picard CollectAlignmentSummaryMetrics Version:2.25.6. On paired .bam files.
Here is the command:
picard CollectAlignmentSummaryMetrics -R /home/fridrikh/human_genome/hg38.fullAnalysisSet.chroms/hs38DH.fa -I '/home/fridrikh/res/out/dedup_sorted/H06HDADXX130110.*.{1,2}.bam' -O '/home/fridrikh/res/out/alignment_metrics/alignment_metrics.{1,2}.txt'
The output (below) clearly shows that I use a wrong way to format the names of paired .bam files. How can I solve this problem?
15:15:59.601 INFO NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/home/fridrikh/miniconda3/envs/bioinformatics/share/picard-2.25.6-0/picard.jar!/com/intel/gkl/native/libgkl_compression.so
[Mon Jun 28 15:15:59 EDT 2021] CollectAlignmentSummaryMetrics --INPUT /home/fridrikh/res/out/dedup_sorted/H06HDADXX130110.*.{1,2}.bam --OUTPUT /home/fridrikh/res/out/alignment_metrics/alignment_metrics.{1,2}.txt --REFERENCE_SEQUENCE /home/fridrikh/human_genome/hg38.fullAnalysisSet.chroms/hs38DH.fa --MAX_INSERT_SIZE 100000 --EXPECTED_PAIR_ORIENTATIONS FR --ADAPTER_SEQUENCE AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT --ADAPTER_SEQUENCE AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG --ADAPTER_SEQUENCE AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT --ADAPTER_SEQUENCE AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG --ADAPTER_SEQUENCE AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT --ADAPTER_SEQUENCE AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG --METRIC_ACCUMULATION_LEVEL ALL_READS --IS_BISULFITE_SEQUENCED false --COLLECT_ALIGNMENT_INFORMATION true --ASSUME_SORTED true --STOP_AFTER 0 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --GA4GH_CLIENT_SECRETS client_secrets.json --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false
[Mon Jun 28 15:15:59 EDT 2021] Executing as fridrikh@DESKTOP-9T76LVB on Linux 4.4.0-19041-Microsoft amd64; OpenJDK 64-Bit Server VM 1.8.0_152-release-1056-b12; Deflater: Intel; Inflater: Intel; Provider GCS is not available; Picard version: Version:2.25.6
[Mon Jun 28 15:15:59 EDT 2021] picard.analysis.CollectAlignmentSummaryMetrics done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=514850816
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" htsjdk.samtools.SAMException: Cannot read non-existent file: file:///home/fridrikh/res/out/dedup_sorted/H06HDADXX130110.*.%7B1,2%7D.bam
at htsjdk.samtools.util.IOUtil.assertFileIsReadable(IOUtil.java:498)
at htsjdk.samtools.util.IOUtil.assertFileIsReadable(IOUtil.java:485)
at picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:105)
at picard.analysis.SinglePassSamProgram.doWork(SinglePassSamProgram.java:94)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:308)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)
-
Hi Serge,
Thanks for writing into our forum! There are a couple things in your command that will cause issues and error messages:
- You are submitting filenames with curly braces ({}) and asterisks (*) which are not legal in our file system format. Because the filename is given in single quotes, the file names are read as-is (so the asterisk is read as a literal asterisk) and the file name is not found in your system.
- You cannot submit multiple input files this way for the input and output files. If you want to submit multiple files, you will either need to write out -I filename1.bam -I filename2.bam etc etc. Or, you can submit a .list file with a list of filenames. You can easily create the list using a bash command, so that would probably be the fastest option.
Hope this helps your command run smoothly!
Best,
Genevieve
Please sign in to leave a comment.
1 comment