"htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Not enough fields" wrong message in the chromHMM run
0
0
Entering edit mode
14 months ago
lhaiyan3 ▴ 60

Hi, I tried to use chromHMM BinarizeBam command, but I got the following wrong message, [+] Loading ChromHMM 1.22 ... Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Not enough fields; File siCtrl/17_siCtrl_H3K14ac.bed; Line 1 Line: chrM 0 64 VH00271:6:AAAF3KNHV:1:1201:55269:30079 60 + at htsjdk.samtools.SAMLineParser.reportFatalErrorParsingLine(SAMLineParser.java:432) at htsjdk.samtools.SAMLineParser.parseLine(SAMLineParser.java:217) at htsjdk.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:248) at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:236) at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:212) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:544) at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:518) at edu.mit.compbio.ChromHMM.Preprocessing.loadGrid(Preprocessing.java:259) at edu.mit.compbio.ChromHMM.Preprocessing.makeBinaryDataFromBed(Preprocessing.java:1052) at edu.mit.compbio.ChromHMM.ChromHMM.main(ChromHMM.java:13265)

Here is my command, java -mx4000M -Djava.awt.headless=true -jar $CHROMHMM_JAR BinarizeBam hg19.sizes siCtrl cellmarkfiletable siCtrl_ChromHMM_output

I used the following command to get the bam file, bwa mem -M -t 32 -R "$RG" $ref ${sampleName}_trim.fastq >${sampleName}.sam java -Xmx60g -XX:ParallelGCThreads=5 -jar $PICARDJARPATH/picard.jar SortSam INPUT=${sampleName}.sam OUTPUT=${sampleName}.bam SORT_ORDER=coordinate

My bam file looks like this, @HD VN:1.6 SO:coordinate @SQ SN:chrM LN:16571 @SQ SN:chr1 LN:249250621 @SQ SN:chr2 LN:243199373 @SQ SN:chr3 LN:198022430 @SQ SN:chr4 LN:191154276 @SQ SN:chr5 LN:180915260 @SQ SN:chr6 LN:171115067 @SQ SN:chr7 LN:159138663 @SQ SN:chr8 LN:146364022 @SQ SN:chr9 LN:141213431 @SQ SN:chr10 LN:135534747 @SQ SN:chr11 LN:135006516 @SQ SN:chr12 LN:133851895 @SQ SN:chr13 LN:115169878 @SQ SN:chr14 LN:107349540 @SQ SN:chr15 LN:102531392 @SQ SN:chr16 LN:90354753 @SQ SN:chr17 LN:81195210 @SQ SN:chr18 LN:78077248 @SQ SN:chr19 LN:59128983 @SQ SN:chr20 LN:63025520 @SQ SN:chr21 LN:48129895 @SQ SN:chr22 LN:51304566 @SQ SN:chrX LN:155270560 @SQ SN:chrY LN:59373566 @RG ID:11_siCtrl_H3K4me1 LB:11_siCtrl_H3K4me1 SM:11_siCtrl_H3K4me1 PL:ILLUMINA @PG ID:bwa PN:bwa VN:0.7.17-r1188 CL:bwa mem -M -t 32 -R @RG\tID:11_siCtrl_H3K4me1\tLB:11_siCtrl_H3K4me1\tSM:11_siCtrl_H3K4me1\tPL:ILLUMINA /fdb/igenomes/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/genome.fa 11_siCtrl_H3K4me1_trim.fastq @PG ID:samtools PN:samtools PP:bwa VN:1.11 CL:samtools view -H 11_siCtrl_H3K4me1.bam

Can anyone please give me some suggestions how to get the correct bam format for the chromHMM command? Thanks very much.

best

HY

chromHMM SAMFormatException • 836 views
ADD COMMENT

Login before adding your answer.

Traffic: 1049 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6