[BioRuby] A new plugin: bio-genomic-interval
Jan Aerts
jan.aerts at gmail.com
Sat Apr 23 09:31:10 UTC 2011
Hi Hiro,
You might take a look at the Slice class in the ruby-ensembl-api at
https://github.com/jandot/ruby-ensembl-api/blob/master/lib/ensembl/core/slice.rb.
This has very similar functionality, and might give some additional ideas as
well, for example:
- Slice#overlaps?(other_slice) => checks whether 2 slices overlap
- Slice#within?(other_slice) => checks whether this slices is contained
within another slice
- Slice#contains?(other_slice) => checks whether this slices contains
another slice
- Slice#excise(array_of_regions) => takes a slices and removes a certain
region, returning an array of smaller slices. For example:
# original_slice = Slice.new('chrX',1,10000)
# new_slices = original_slice.excise([500..750, 1050..1075])
# new_slices.each do |s|
# puts s.display_name
# end
#
# # result:
# # chromosome:X:1:499:1
# # chromosome:X:751:1049:1
# # chromosome:X:1076:10000:1
- Slice#sub_slice(start, stop) => creates a truncated version of this slice
- Slice#split(length, overlap) => splits a slice into smaller bits (e.g.
creates an array of slices of 100bp long), optionally with an overlap
between the resultant slices.
Just my 2c. (Also: if you have feature requests, ideas or other comments for
the ruby-ensembl-api, see rubyensemblapi.userecho.com)
jan.
On 7 April 2011 07:03, MISHIMA, Hiroyuki <missy at be.to> wrote:
> Hi all,
>
> I have uploaded a new Bioruby plugin 'bio-genomic-interval'.
>
> The Bio::GenomicInterval class is designed to handle genomic intervals
> such as "chr1:123-456". The class has methods to detect the overlapping
> status between two intervals. It may help to avoid messy case branching
> and improve readability of codes.
>
> Developmental tools for BioRuby plugin and documents in the BioRuby wiki
> were very helpful. Thank you all the authors.
>
> Please see also the followings:
> GitHub -
> https://github.com/misshie/bioruby-genomic-interval
> RubyGems.org -
> https://rubygems.org/gems/bio-genomic-interval
>
> Sincerely yours,
> Hiro.
> --
> MISHIMA, Hiroyuki, DDS, Ph.D.
> COE Research Fellow
> Department of Human Genetics
> Nagasaki University Graduate School of Biomedical Sciences
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
>
More information about the BioRuby
mailing list