Comments (7)
can you re-index the bam and try again?
from goleft.
Thank you for your quick reply.
I tried to re-create the bam index using samtools index
, but found EOF marker is absent
. So, I re-generated the bam/index. It's solved now.
from goleft.
Hi,
I've installed the 'goleft' from source, and trying to run the 'indexcov' with the following command (it's index is present in the same dir):
goleft indexcov --directory indexcov my_bam.bam
But I'm getting the error below:
`panic: sam: duplicate field: line 2: "@pg\tID:bwa\tPN:bwa\tVN:0.7.15-r1140\tCL:bwa mem -t 32 -R @rg\tID:TZ5637P\tSM:TZ5637P\tPL:ILLUMINA\tPU:TZ5637P\tLB:TZ5637P /Shares/layer_shared/ref/hg38/GRCh38_full_analysis_set_plus_decoy_hla.fa TZ5637P_TD180603257_HT3LKCCXY_L3_1.fq.gz TZ5637P_TD180603257_HT3LKCCXY_L3_2.fq.gz"
goroutine 1 [running]:
github.com/brentp/goleft/indexcov.RefsFromBam(0x7fff13dff9cf, 0x5b, 0x0, 0x0, 0xc0002660d0, 0x7fff13dff9c6, 0x8)
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:321 +0x4c4
github.com/brentp/goleft/indexcov.getReferences(0x7fff13dff9c6, 0x8, 0xc00022ae01)
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:338 +0xbe
github.com/brentp/goleft/indexcov.Main()
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:403 +0x1e3
main.main()
/Users/maja5467/go/src/github.com/brentp/goleft/cmd/goleft/goleft.go:68 +0x170
`
Any thoughts?
Regards,
Mahmood Javaid.
from goleft.
this error is from biogo/hts, I think it's finding ID:bwa
and ID:TZ...
and thinking that's a duplicate tag. probably because you used \t
instead of the expanded, literal tab when you called bwa
maybe @kortschak could verify?
the solution is to re-header or change the way you call bwa mem.
from goleft.
Thank you for your prompt reply, for the time being, I'll probably re-run the bwa-mem.
from goleft.
@javaidm Can you post the complete panic output in a <pre>
block (triple back tick block), and paste the first few lines of the SAM header also in a code block.
It looks to me like you have a corrupt header with an @pg
and @rg
line on the same line. Also, I'm a little confused that these are lower case; the SAM spec requires that these be upper case.
Oh, I see what the problem is, the -R
flag takes "@rg\tID:TZ5637P\tSM:TZ5637P\tPL:ILLUMINA\tPU:TZ5637P\tLB:TZ5637P"
as a param. This is not correctly being interpreted. I don't see a sensible way to deal with this kind of horror. Looking at the bwa manual, the string is literally quoted, are you doing this? From what I can see it looks like you should do
bwa mem -t 32 -R '@rg\tID:TZ5637P\tSM:TZ5637P\tPL:ILLUMINA\tPU:TZ5637P\tLB:TZ5637P' /Shares/layer_shared/ref/hg38/GRCh38_full_analysis_set_plus_decoy_hla.fa
but you seem to be doing
bwa mem -t 32 -R "@rg\tID:TZ5637P\tSM:TZ5637P\tPL:ILLUMINA\tPU:TZ5637P\tLB:TZ5637P" /Shares/layer_shared/ref/hg38/GRCh38_full_analysis_set_plus_decoy_hla.fa
Can you confirm?
from goleft.
panic: sam: duplicate field: line 2: "@PG\tID:bwa\tPN:bwa\tVN:0.7.15-r1140\tCL:bwa mem -t 32 -R @RG\tID:TZ5637P\tSM:TZ5637P\tPL:ILLUMINA\tPU:TZ5637P\tLB:TZ5637P /Shares/layer_shared/ref/hg38/GRCh38_full_analysis_set_plus_decoy_hla.fa TZ5637P_TD180603257_HT3LKCCXY_L3_1.fq.gz TZ5637P_TD180603257_HT3LKCCXY_L3_2.fq.gz"
goroutine 1 [running]:
github.com/brentp/goleft/indexcov.RefsFromBam(0x7ffd8e65f690, 0x5b, 0x0, 0x0, 0xc0001e4340, 0x7ffd8e65f689, 0x6)
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:321 +0x4c4
github.com/brentp/goleft/indexcov.getReferences(0x7ffd8e65f689, 0x6, 0xc0001aad01)
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:338 +0xbe
github.com/brentp/goleft/indexcov.Main()
/Users/maja5467/go/src/github.com/brentp/goleft/indexcov/indexcov.go:403 +0x1e3
main.main()
/Users/maja5467/go/src/github.com/brentp/goleft/cmd/goleft/goleft.go:68 +0x170```
I can confirm that the string is not being literally quoted at the moment (it's part of a Nextflow pipeline, so I need to find out a way to both literally quote it and achieve the variable interpolation). Anyhow, for now I managed to run ```goleft indexcov``` on cram index, but will look into running the 'bwa-mem' as prescribed in their manual. Thanks for your help!
from goleft.
Related Issues (20)
- Feature request: New option --exclude for indexsplit HOT 1
- indexcov support for csi indexes HOT 2
- ndexcv: excluding chromosome: NC_031965 because of exclude-pattern: ^chrEBV$|^NC|_random$|Un_|^HLA\-|_alt$|hap\d HOT 2
- coverage of the customized genome HOT 2
- error: bam is required HOT 4
- link to golang typo
- suggestion: zoomable chromosome depth plots in indexcov HOT 1
- indexcov shows stepwise coverage distribution HOT 4
- Feature request: New option --exclude for covstats HOT 2
- Indexcov errors HOT 2
- error on depth, seems to make temp file it can't find
- Negative alnSpan error HOT 2
- No longer possible to build from source or include in a Docker image HOT 2
- Running Indexcov on cram files with different paths HOT 2
- What is the value of the insert size ? HOT 2
- indexcov: usage with long reads ? HOT 1
- Indexcov searching for cram.bai HOT 1
- covstats: % unmapped calculation seems inaccurate (>3000%, etc) HOT 5
- indexcov everything is DEL or DUP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goleft.