<commit_before>When /^I open it with a MAF reader$/ do
  @parser = Bio::MAF::Parser.new(@src_f)
end

Then /^the MAF version should be "(.*?)"$/ do |v_spec|
  @parser.header.version.to_s.should == v_spec
end

Then /^the scoring scheme should be "(.*?)"$/ do |s_spec|
  @parser.header.scoring.should == s_spec
end

Then /^the alignment parameters should be "(.*?)"$/ do |a_spec|
  @parser.header.alignment_params.should == a_spec
end

Then /^an alignment block can be obtained$/ do
  @block = @parser.parse_block
  @block.should_not be_nil
end

Then /^the alignment block has (\d+) sequences$/ do |n_seq|
  @block.size.should == n_seq.to_i
end

Then /^sequence (\d+) has (\w.*?) "(.*?)"$/ do |i, method, str|
  method_sym = method.gsub(/ /, '_').to_sym
  @block.raw_seq(i.to_i).send(method_sym).should == str
end

Then /^sequence (\d+) has (\w.*?) (\d+)\s*$/ do |i, method, num|
  method_sym = method.gsub(/ /, '_').to_sym
  @block.raw_seq(i.to_i).send(method_sym).should == num.to_i<commit_msg>Look at #sequences.size to find out how many sequences are in a block.<commit_after>When /^I open it with a MAF reader$/ do
  @parser = Bio::MAF::Parser.new(@src_f)
end

Then /^the MAF version should be "(.*?)"$/ do |v_spec|
  @parser.header.version.to_s.should == v_spec
end

Then /^the scoring scheme should be "(.*?)"$/ do |s_spec|
  @parser.header.scoring.should == s_spec
end

Then /^the alignment parameters should be "(.*?)"$/ do |a_spec|
  @parser.header.alignment_params.should == a_spec
end

Then /^an alignment block can be obtained$/ do
  @block = @parser.parse_block
  @block.should_not be_nil
end

Then /^the alignment block has (\d+) sequences$/ do |n_seq|
  @block.sequences.size.should == n_seq.to_i
end

Then /^sequence (\d+) has (\w.*?) "(.*?)"$/ do |i, method, str|
  method_sym = method.gsub(/ /, '_').to_sym
  @block.raw_seq(i.to_i).send(method_sym).should == str
end

Then /^sequence (\d+) has (\w.*?) (\d+)\s*$/ do |i, method, num|
  method_sym = method.gsub(/ /, '_').to_sym
  @block.raw_seq(i.to_i).send(method_sym).should == num.to_i
{'fraction_non_alphanumeric': 0.18996590355577203, 'fraction_numerical': 0.0, 'mean_word_length': 3.7990654205607477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5203726', 'n_tokens_mistral': 806, 'n_tokens_neox': 779, 'n_words': 211}