GithubHelp home page GithubHelp logo

Comments (7)

brentp avatar brentp commented on May 23, 2024

can you re-index the bam and try again?

from goleft.

YiweiNiu avatar YiweiNiu commented on May 23, 2024

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.

javaidm avatar javaidm commented on May 23, 2024

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.

brentp avatar brentp commented on May 23, 2024

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.

javaidm avatar javaidm commented on May 23, 2024

Thank you for your prompt reply, for the time being, I'll probably re-run the bwa-mem.

from goleft.

kortschak avatar kortschak commented on May 23, 2024

@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.

javaidm avatar javaidm commented on May 23, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.