<commit_before>Feature: Producing an table view of alternate entries
  In order to submit non-CDS genome annotations
  A user can use the "table" command with --generate_encoded_features
  to generate the genbank annotation table format with non-CDS

  @disable-bundler
  Scenario: Creating a tRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=tRNA;product=tRNA-Gly
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	tRNA
        			product	tRNA-Gly

        """

  @disable-bundler
  Scenario: Creating a rRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=rRNA;product=16S ribosomal RNA
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	rRNA
        			product	16S ribosomal RNA

        """

  @disable-bundler
  Scenario: Creating a tmRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=tmRNA;product=tmRNA
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	tmRNA
        			product	tmRNA

        """


  @disable-bundler
  Scenario: Creating a ncRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:<commit_msg>Add feature for producing error for unknown feature<commit_after>Feature: Producing an table view of alternate entries
  In order to submit non-CDS genome annotations
  A user can use the "table" command with --generate_encoded_features
  to generate the genbank annotation table format with non-CDS

  @disable-bundler
  Scenario: Creating an unknown feature type using 'feature_type'
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=unknown;product=something
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 1
      And the output should contain:
        """
        Error. Unknown feature type 'unknown'
        """

  @disable-bundler
  Scenario: Creating a tRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=tRNA;product=tRNA-Gly
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	tRNA
        			product	tRNA-Gly

        """

  @disable-bundler
  Scenario: Creating a rRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=rRNA;product=16S ribosomal RNA
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	rRNA
        			product	16S ribosomal RNA

        """

  @disable-bundler
  Scenario: Creating a tmRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
        """
        ##gff-version 3
        contig1	.	gene	1	3	.	-	1	ID=gene1;feature_type=tmRNA;product=tmRNA
        """
      And I append to "Gemfile" with:
        """
        gem 'genomer-plugin-view', :path => '../../../'
        """
     When I run `genomer view table --identifier=genome --generate_encoded_features`
     Then the exit status should be 0
      And the output should contain:
        """
        3	1	gene
        			locus_tag	gene1
        3	1	tmRNA
        			product	tmRNA

        """

  @disable-bundler
  Scenario: Creating a ncRNA entry from using the 'feature_type' field
    Given I successfully run `genomer init project`
      And I cd to "project"
      And I write to "assembly/scaffold.yml" with:
        """
        ---
          - sequence:
              source: contig1
        """
      And I write to "assembly/sequence.fna" with:
        """
        >contig1
        AAAAATTTTTGGGGGCCCCC
        """
      And I write to "assembly/annotations.gff" with:
{'fraction_non_alphanumeric': 0.09702017832003754, 'fraction_numerical': 0.012318160488033787, 'mean_word_length': 1.7306213965406791, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4210212', 'n_tokens_mistral': 2710, 'n_tokens_neox': 2517, 'n_words': 816}