Giter VIP home page Giter VIP logo

goldilocks's People

Contributors

ar0ch avatar gitter-badger avatar samstudio8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goldilocks's Issues

Codon usage frequency.

Redundancy in the genetic code means that it is possible to represent 64 different amino acids even though there are only 21 used. This has resulted in many codons being used for each amino acid. Some species prefer to use one codon over another which results in a species specific codon usage profile.

Can Goldilocks be used to analyse the frequency that a particular codon is used in a genome?

ZeroDivisionError when FA contains no valid sequences

nope.fa

>NO
>OP

nope.fa.idx

NO      0       4       -1      -1
OP      0       8       -1      -1

nope.py

from goldilocks.goldilocks import Goldilocks
from goldilocks.strategies import NucleotideCounterStrategy

data = {
    "seq": {
        "idx": "nope.fa.idx"
    }
}

g = Goldilocks(NucleotideCounterStrategy(["A"]), data, length=3, stride=1, is_faidx=True) 
g.query("mean", track="A", limit=5).export_meta(sep="\t")
File "/home/sam/Projects/Packages/goldilocks/goldilocks/goldilocks.py", line 525, in __apply_filter_func
    mean_percentile = (len(track_scores[track_scores <= 0]) / float(len(track_scores))) * 100
ZeroDivisionError: float division by zero

Make the packaging less terrible

  • Remove files that are not required for distribution
  • Ensure all options are set as needed
  • Remove reliance on terrible Makefile
  • Better options for compilation of documentation

Can we be more UNIXy?

A comment raised on a reddit post about Goldilocks points out that some of the operations performed by the tool might well serve as standalone tools to be used in UNIX fashion.

At the very least, supporting streamed input could be a nice idea.

Allow chromosomes to be provided as individual FASTA files

I'd like to be able to supply individual files rather than one large FASTA file. For example:

sequence_data = { "mysample": {
        "chr1": {"file": "./chr1.fna.fai"},
        "chr2": {"file": "./chr2.fna.fai"},
        "chr3": {"file": "./chr3.fna.fai"},
        "chr4": {"file": "./chr4.fna.fai"},
        "chr5": {"file": "./chr5.fna.fai"},
}}
g = Goldilocks(GCRatioStrategy(), sequence_data, length="500K", stride="100K", is_faidx=True)
g.plot(group="mysample", title="GC Content")

Output BED format

Goldilocks should output results in a more useful format than tabular, BED seems a good bet.

PositionCounterStrategy incorrectly reports

The PositionCounterStrategy uses the default track counter, which is then used later for calculating summary statistics. This has the side effect of reporting G times more variants than there actually are.

Add some sort of after census callback

It could be worth investigating providing a mechanism for post-census functions to be called on the count matrix once a census has been completed. This could allow for a GCRatioStrategy to just be a wrapper of the NucleotideCounterStrategy that has a post-census callback to calculate and return the necessary ratios.

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.