-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of block slicing for #79.
- Loading branch information
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Feature: MAF slicing | ||
In order to obtain just the alignment data covering a given region | ||
I want to be able to take slices of alignment blocks over | ||
A given interval | ||
|
||
Scenario: Interval covering two blocks | ||
Given a MAF source file "mm8_chr7_tiny.maf" | ||
And a Kyoto Cabinet index file "mm8_chr7_tiny.kct" | ||
When I open it with a MAF reader | ||
And I enable the :remove_gaps parser option | ||
And open a new MAF writer | ||
And write the header from the original MAF file | ||
And filter for only the species | ||
| mm8 | | ||
| rn4 | | ||
And search for blocks between positions 80082350 and 80082380 of mm8.chr7 | ||
And slice the resulting blocks according to the given interval | ||
And write all the matched blocks | ||
Then the output should match, except whitespace, "mm8_chr7_tiny_slice1.maf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
When /^slice the resulting blocks according to the given interval$/ do | ||
# @blocks and @interval | ||
@blocks = @blocks.collect { |b| b.slice(@interval) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
##maf version=1 | ||
a score=0.0 | ||
s mm8.chr7 80082350 18 + 145134094 TGGAGGGCGGTCCCAGCA | ||
s rn4.chr1 136011801 18 + 267910886 CGGAGGGCGGTCCCAGCA | ||
|
||
a score=0.0 | ||
s mm8.chr7 80082368 12 + 145134094 TGAGAGGGCATG | ||
s rn4.chr1 136011819 12 + 267910886 TGAGAGGGCATG | ||
|