Code Monkey home page Code Monkey logo

Comments (5)

MrOlm avatar MrOlm commented on August 16, 2024

Hi Nico,

I'm a little confused about what you're asking for. If you're looking for the full coverage of every position, you can access that in the raw_data files (e.g. https://instrain.readthedocs.io/en/latest/advanced_use.html#accessing-other-data)

If it's something else you're looking for please let me know

Matt

from instrain.

ntromas avatar ntromas commented on August 16, 2024

from instrain.

ntromas avatar ntromas commented on August 16, 2024

from instrain.

MrOlm avatar MrOlm commented on August 16, 2024

Hi Nico,

To load the covT file, you should do something like the following in python:

import inStrain
import inStain.SNVprofile
import inStrain.profile.profile_utilities

# Load your inStrain profile
IS = inStain.SNVprofile.SNVprofile(`/home/mattolm/inStrainOutputTest/`)

# Extract raw covT
covT =   IS.get('covT')

# Declare the scaffold you want to analyze and it's length
scaff = 'test_scaffold'
scaff_length = 10000

# Get the coverage information for that scaffold
scaff_cov =  inStrain.profile.profile_utilities.mm_counts_to_counts_shrunk(covT[scaff], fill_zeros=scaff_length)

Once you run something like that, scaff_cov will be a python dictionary where if you input a 0-based position it will give you the coverage (e.g. scaff_cov[10]) will report the coverage at position 10 at that scaffold.

Best,
Matt

from instrain.

ntromas avatar ntromas commented on August 16, 2024

from instrain.

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.