-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
1 deletion.
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,2 @@ | ||
- Island masking assumes one unique element, maybe consider a | ||
neighbour. The example in test/data is rather a good one. |
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,25 @@ | ||
module Bio | ||
module BioAlignment | ||
module PhylipOutput | ||
# Calculate header info from alignment and return as string | ||
def PhylipOutput::header alignment | ||
"#{alignment.size} #{alignment[0].length}\n" | ||
end | ||
|
||
# Output sequence PAML style and return as a multi-line string | ||
def PhylipOutput::to_paml seq, size=60 | ||
buf = seq.id+"\n" | ||
coding = if seq.kind_of?(CodonSequence) | ||
seq.to_nt | ||
else | ||
seq.to_s | ||
end | ||
coding.scan(/.{1,#{size}}/).each do | section | | ||
buf += section + "\n" | ||
end | ||
buf | ||
end | ||
end | ||
end | ||
end | ||
|