Sha256: f6793b5e386089dd4594f3dffda42e9e791be22e6a25027969add953387b69c5
Contents?: true
Size: 1.41 KB
Versions: 3
Compression:
Stored size: 1.41 KB
Contents
require "spec_helper" module FastaRead describe Sequence do let(:fasta) {">chr1\nAATCACACGTGCAGGAACCCTTTTCCAAAGGAGGGTCACGCTCACAGCTT\nCTGGAGTAGGACATGGACTTGTCTTTTTGGAGGCCCATCCTCAACGCACC\nACAGTTGACTACATCAAGGTCTGCCTCTGATCTGGTGGGAGTGCTGGGTG\nGTCTGTCTCCACCAGCACTTTGTGGGTGGGCTCTGTCCCCAGGAAATGCT\nC"} describe "#real_cstart" do context "when @cstart is > 0" do subject {Sequence.new(fasta, "chr12", "5", "200").real_cstart} it "should add file header string length" do expect(subject).to eq 10 end end context "when @cstart is 0" do subject {Sequence.new(fasta, "chr1", "0", "200").real_cstart} it "should not subtract 1" do expect(subject).to eq 5 end end end describe "#real_cend" do subject {Sequence.new(fasta, "chr1", "0", "200").real_cend} it "should subtract 1 and add file header string length" do expect(subject).to eq 204 end end describe "#process" do subject {Sequence.new(fasta, "chr1", "0", "200").process} describe "with a continuous character stream" do it "builds a character sequence" do expect(subject).to eq "AATCACACGTGCAGGAACCCTTTTCCAAAGGAGGGTCACGCTCACAGCTTCTGGAGTAGGACATGGACTTGTCTTTTTGGAGGCCCATCCTCAACGCACCACAGTTGACTACATCAAGGTCTGCCTCTGATCTGGTGGGAGTGCTGGGTGGTCTGTCTCCACCAGCACTTTGTGGGTGGGCTCTGTCCCCAGGAAATGCT" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fasta_read-2.0.3 | spec/fasta_read/sequence_spec.rb |
fasta_read-2.0.2 | spec/fasta_read/sequence_spec.rb |
fasta_read-2.0.1 | spec/fasta_read/sequence_spec.rb |