Quantcast
Channel: Recent Discussions — GATK-Forum
Viewing all articles
Browse latest Browse all 12345

Picard Output Gives Malformed Bam and other files

$
0
0

I ran Picard with the following script without error, but when I ran GATK after that, I got error message that says the .bam file and .bai files are malformed.
java -Xmx25G -Djava.io.tmpdir=tmp -jar ${Picard} SortSam \
INPUT=${BWA_dir}/${sample}.sam OUTPUT=${Picard_dir}/${sample}.sorted.sam SORT_ORDER=coordinate
java -Xmx25G -Djava.io.tmpdir=tmp -jar ${Picard} MarkDuplicatesWithMateCigar \
INPUT=${Picard_dir}/${sample}.sorted.sam OUTPUT=${Picard_dir}/${sample}.dedupped.bam \
METRICS_FILE=${Picard_dir}/${sample}.metrics.txt REMOVE_DUPLICATES=false ASSUME_SORTED=true \
MINIMUM_DISTANCE=200
IFS='_' read -a RG <<< "$sample"
java -Xmx25G -Djava.io.tmpdir=tmp -jar ${Picard} AddOrReplaceReadGroups \
I=${Picard_dir}/${sample}.dedupped.bam O=${Picard_dir}/${sample}.readgroups.bam \
RGLB=$sample RGPL=illumina RGPU=$RG[1] RGSM=$sample
java -Xmx25G -Djava.io.tmpdir=tmp -jar ${Picard} BuildBamIndex \
INPUT=${Picard_dir}/${sample}.readgroups.bam OUTPUT=${Picard_dir}/${sample}.readgroups.bai

I tried to run ValidateSamFile, but it is not clear to me how this could make any difference.
java -Xmx25G -Djava.io.tmpdir=tmp -jar ${Picard} ValidateSamFile \
INPUT=${BWA_dir}/${sample}.sam OUTPUT=${Picard_dir}/${sample}.sorted.sam \
IGNORE=INVALID_MAPPING_QUALITY

This tool does not make any change on .bam or .bai, just gives a report:
[Thu Oct 06 16:40:19 CEST 2016] picard.sam.ValidateSamFile INPUT=/home/kong/Haiying/Projects/PrimaryMelanoma/ILSE1669_A22/Lock/BWA_MEM/B101681.sam OUTPUT=B101681.valid.sam IGNORE=[INVALID_MAPPING_QUALITY] IGNORE_WARNINGS=true MODE=VERBOSE MAX_OUTPUT=100 VALIDATE_INDEX=true INDEX_VALIDATION_STRINGENCY=EXHAUSTIVE IS_BISULFITE_SEQUENCED=false MAX_OPEN_TEMP_FILES=8000 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
[Thu Oct 06 16:40:19 CEST 2016] Executing as kong@cloud-hpc-06-kong on Linux 3.11.10-29-default amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b26; Picard version: 2.6.0-SNAPSHOT
INFO 2016-10-06 16:42:21 SamFileValidator Validated Read 10,000,000 records. Elapsed time: 00:02:02s. Time for last 10,000,000: 122s. Last read position: 16:47,345,262
INFO 2016-10-06 16:44:20 SamFileValidator Validated Read 20,000,000 records. Elapsed time: 00:04:01s. Time for last 10,000,000: 118s. Last read position: 17:38,958,465
INFO 2016-10-06 16:46:16 SamFileValidator Validated Read 30,000,000 records. Elapsed time: 00:05:57s. Time for last 10,000,000: 115s. Last read position: 17:46,631,080
INFO 2016-10-06 16:48:12 SamFileValidator Validated Read 40,000,000 records. Elapsed time: 00:07:53s. Time for last 10,000,000: 116s. Last read position: 6:112,671,116
INFO 2016-10-06 16:50:08 SamFileValidator Validated Read 50,000,000 records. Elapsed time: 00:09:49s. Time for last 10,000,000: 116s. Last read position: 18:61,599,077
INFO 2016-10-06 16:52:01 SamFileValidator Validated Read 60,000,000 records. Elapsed time: 00:11:42s. Time for last 10,000,000: 112s. Last read position: 15:68,482,437
INFO 2016-10-06 16:53:54 SamFileValidator Validated Read 70,000,000 records. Elapsed time: 00:13:35s. Time for last 10,000,000: 113s. Last read position: 11:75,511,843
INFO 2016-10-06 16:55:47 SamFileValidator Validated Read 80,000,000 records. Elapsed time: 00:15:28s. Time for last 10,000,000: 112s. Last read position: 22:36,205,964
INFO 2016-10-06 16:57:38 SamFileValidator Validated Read 90,000,000 records. Elapsed time: 00:17:19s. Time for last 10,000,000: 111s. Last read position: 3:49,137,301
INFO 2016-10-06 16:59:35 SamFileValidator Validated Read 100,000,000 records. Elapsed time: 00:19:15s. Time for last 10,000,000: 116s. Last read position: 11:118,373,687
[Thu Oct 06 17:00:16 CEST 2016] picard.sam.ValidateSamFile done. Elapsed time: 19.96 minutes.
Runtime.totalMemory()=2213543936
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp

Could any one please help me with this.

It would be great if I can fix this before tomorrow.


Viewing all articles
Browse latest Browse all 12345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>