Coder Social home page Coder Social logo

Comments (9)

mbhall88 avatar mbhall88 commented on June 2, 2024

When you say you get 240x instead of 250x is that based on the rasusa logs or some other way of calculating this?

The way rasusa subsamples for paired reads is it gathers all of the read lengths for the first fastq file (R1), and randomly selects reads until the total length of those sampled reads is half of the required total read length for the given genome size and coverage. It then outputs those sampled reads and their mate in R2. So there is an implicit assumption here that the mate has the same read length. So if you're seeing 240x instead of 250x that suggests your R2 might have had more bases trimmed than R1...

from rasusa.

ilyavs avatar ilyavs commented on June 2, 2024

Hi,
Thank you for your response. It is typical for R2 to have lower quality than R1 and therefore one could expect R2 reads to be shorter after quality trimming. Given your explanation of how rasusa works, I understand the reason for the difference in coverage.
I get 240x instead of 250x calculated by taking the total number of base pairs after subsampling with rasusa and dividing by the genome size provided to rasusa. If I remember correctly, this matched the rasusa logs but I don't have these at hand.
Thanks,
Ilya.

from rasusa.

ilyavs avatar ilyavs commented on June 2, 2024

I would suggest summing the read length of R1 and R2 and randomly selecting read pairs until the total length of those sampled reads matches the required total read length for the given genome size and coverage.

from rasusa.

mbhall88 avatar mbhall88 commented on June 2, 2024

Ok, that makes sense then.

I would suggest summing the read length of R1 and R2 and randomly selecting read pairs until the total length of those sampled reads matches the required total read length for the given genome size and coverage.

This is a more accurate solution to the than what I currently do for sure. I'll look at trying to change the implementation to do this.

from rasusa.

ilyavs avatar ilyavs commented on June 2, 2024

Great. Thank you :)

from rasusa.

ilyavs avatar ilyavs commented on June 2, 2024

Hi,
Any idea when this fix will be implemented and distributed?
Thanks,
Ilya.

from rasusa.

mbhall88 avatar mbhall88 commented on June 2, 2024

Sorry @ilyavs , I am currently writing up my PhD thesis so I don't have a huge amount of spare time. However, it is still very much high on my list of things to do so hopefully I can get around to it soon.

from rasusa.

mbhall88 avatar mbhall88 commented on June 2, 2024

Hi @ilyavs, would be able to do me a favour and test out b72405e and see if it resolves this? You can either build from the source in that commit, or if you are using a container you can use the following image

# for docker
quay.io/mbhall88/rasusa:b72405e
# for singularity
docker://quay.io/mbhall88/rasusa:b72405e

from rasusa.

mbhall88 avatar mbhall88 commented on June 2, 2024

This should be sorted in version 0.4.0. Let me know if there are still problems

from rasusa.

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.