GithubHelp home page GithubHelp logo

Comments (5)

Magdoll avatar Magdoll commented on July 21, 2024

Hi @lishen,
This error is almost always caused by one of two things:

  1. the SAM file was not sorted properly. The sort command should be:
sort -k 3,3 -k 4,4n input.sam > input.sorted.sam
  1. The SAM file contains incomplete alignments. This is usually discovered via running the aligner (GMAP, STAR, etc) again and ensuring that the process finished.

If neither fixes the problem, I would need to take a look at the SAM file to know the cause.

Thanks,
--Liz

from cdna_cupcake.

lishen avatar lishen commented on July 21, 2024

@Magdoll ,

I converted sam to bam and sorted them using samtools and convert back to sam. I'm sure the sam files are already sorted.

But what do you mean by incomplete alignments? There are unmapped reads, which are at the tail of a sam file with a tag value of 4. Are they the reads that are causing trouble?

from cdna_cupcake.

Magdoll avatar Magdoll commented on July 21, 2024

Hi @lishen,

Sorting using samtools has been known to cause this error. Can you please try:

sort -k 3,3 -k 4,4n input.sam > input.sorted.sam

and see if this problem goes away? Alternatively, you can remove all alignments that are unmapped.

The error shows up because it is expecting all unmapped alignments to either not exist at all, or appear all at the beginning of the SAM file. It's trying to print "r.qCoverage" for an alignment that is unmapped and since it's unmapped r.qCoverage is not a number.

--Liz

from cdna_cupcake.

Magdoll avatar Magdoll commented on July 21, 2024

Closing issue unless noted otherwise.

from cdna_cupcake.

rlittman16 avatar rlittman16 commented on July 21, 2024

I was using samtools sort, and got this error then I used:
sort -k 3,3 -k 4,4n input.sam > input.sorted.sam
I have the same error.

from cdna_cupcake.

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.