Coder Social home page Coder Social logo

bed.jl's Introduction

Bio

Latest release MIT license Pkg Status

This package has been depreceated. Full details are available here. You might still download and use this package, as we don't want old scripts to break. However going forward, know that this repository is archived and read only, no further updates or fixes will be committed. You should use the packages that replace Bio.jl - a list is available here.

bed.jl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

bed.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Skip comments in BED files

Expected Behavior

BED file reader respects comments. Not sure if this is in the BED spec, or if it's just not going to be supported, making this issue for others to reference though

Current Behavior

When trying to read a file with comments(prefixed with #, see included example file) this error is thrown

LoadError: ArgumentError: malformed file

Possible Solution / Implementation

Allow comments

Steps to Reproduce (for bugs)

Sorry, GH issues don't support BED files, apparently.

# HOMER Peaks
# Peak finding parameters:
# tag directory = GM_tagdir
#
# total peaks = 158781
# peak size = 153
# peaks found using tags on both strands
# minimum distance between peaks = 306
# fragment length = 152
# genome size = 2000000000
# Total tags = 322230773.0
# Total tags in peaks = 93989466.0
# Approximate IP efficiency = 29.17%
# tags per bp = 0.114786
# expected tags per peak = 17.562
# maximum tags considered per bp = 16.0
# effective number of tags used for normalization = 10000000.0
# Peaks have been centered at maximum tag pile-up
# FDR rate threshold = 0.001000000
# FDR effective poisson threshold = 1.591138e-05
# FDR tag threshold = 38.0
# number of putative peaks = 682969
#
# size of region used for local filtering = 10000
# Fold over local region required = 4.00
# Poisson p-value over local region required = 1.00e-04
# Putative peaks filtered by local signal = 523066
#
# Maximum fold under expected unique positions for tags = 2.00
# Putative peaks filtered for being too clonal = 1122
#
# cmd = findPeaks GM_tagdir -style factor -o GM.peaks.txt
#
# Column Headers:
#PeakID	chr	start	end	strand	Normalized Tag Count	focus ratio	findPeaks Score	Fold Change vs Local	p-value vs Local	Clonal Fold Change
chr21	8401346	8401499	chr21-3	1	+
chr21	8445578	8445731	chr21-1	1	+
chr21	8218308	8218461	chr21-2	1	+
for interval in open(BED.Reader, "test.bed")
    print(BED.chrom(interval))
end

Context

Your Environment

  • Package Version used:
  • Julia Version used:
  • Operating System and version (desktop or mobile):
  • Link to your project:

Reading whole file or FileIO integration ?

In 99% of my use cases l just want to read the whole bed file and get a vector of records. Doing so requires quite a bit of boilerplate :

# Import the BED module.
using BED

# Open a BED file.
reader = open(BED.Reader, "data.bed")

# Iterate over records.
for record in reader
    # Do something on record (see Accessors section).
    chrom = BED.chrom(record)
    # ...
end

# Finally, close the reader.
close(reader)

Boilerplate that every user will have to write (possibly several times). In comparison in Python you can do pr.read_bed(path). This seems like an important usability issue.

The solution would either to add a internal BED.load("file.bed") or to integrate FileO interface. I don't have a strong preference but l would also do the same for other "small" (that typically fit in memory) file format like VCF so it would be better to be consistent about it. To note FileIO also has a streaming interface for large files, so it could also be used for bams and fastqs.

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.