<commit_before><?xml version="1.0"?>
<tool id="seqtk_subseq" name="seqtk_subseq" version="@WRAPPER_VERSION@.0">
  <description>extract subsequences from FASTA/Q files</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"/>
  <expand macro="stdio"/>
  <command><![CDATA[seqtk subseq $t
-l $l
$in_file
#if $source.source == 'bed':
  $in_bed
#else
  $name_list
#fi

#if t == '-t':
 | awk 'BEGIN{print "chr\tunknown\tseq"}1'
#end if

> $default]]></command>
  <inputs>
    <param name="in_file" type="data" format="fasta,fastq" label="Input fasta/q file"/>
    <conditional name="source">
      <param name="source" type="select" label="Select source of sequence choices">
        <option value="bed">BED</option>
        <option value="name">FASTA/Q ID list</option>
      </param>
      <when value="bed">
        <param name="in_bed" type="data" format="bed" label="Input BED file"/>
      </when>
      <when value="name">
        <param name="name_list" type="data" format="txt" label="Input fasta file"/>
      </when>
    </conditional>
    <param checked="false" label="TAB delimited output" help="(-t)" name="t" type="boolean" falsevalue="" truevalue="-t"/>
    <param label="sequence line length" help="(-l)" name="l" type="integer" value="0"/>
  </inputs>
  <outputs>
    <data format_source="in_file" hidden="false" name="default" label="Selected sequences from $in_file.name">
      <change_format>
        <when input="t" value="-t" format="tabular"/>
      </change_format>
    </data>
  </outputs>
  <help><![CDATA[
**What it does**

Given a list of newline separated IDs from a fasta file, this will extract those named fasta sequences from the input file.

::

    # Input ID list
    seq1

    # Input fasta
    >seq1
    ACGTMRWSYK
    >seq2
    RWSYKACGTM

results in

::

    # Output result
    >seq1
    ACGTMRWSYK

@ATTRIBUTION@
]]></help>
</tool>
<commit_msg>Fixed subseq<commit_after><?xml version="1.0"?>
<tool id="seqtk_subseq" name="seqtk_subseq" version="@WRAPPER_VERSION@.0">
  <description>extract subsequences from FASTA/Q files</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"/>
  <expand macro="stdio"/>
  <command><![CDATA[seqtk subseq $t
-l $l
$in_file

#if $source.type == 'bed':
  $in_bed
#else
  $name_list
#end if

#if $t == '-t':
 | awk 'BEGIN{print "chr\tunknown\tseq"}1'
#end if

> $default]]></command>
  <inputs>
    <param name="in_file" type="data" format="fasta,fastq" label="Input fasta/q file"/>
    <conditional name="source">
      <param name="type" type="select" label="Select source of sequence choices">
        <option value="bed">BED</option>
        <option value="name">FASTA/Q ID list</option>
      </param>
      <when value="bed">
        <param name="in_bed" type="data" format="bed" label="Input BED file"/>
      </when>
      <when value="name">
        <param name="name_list" type="data" format="txt" label="Input fasta file"/>
      </when>
    </conditional>
    <param label="TAB delimited output" help="(-t)" name="t" type="boolean" falsevalue="" truevalue="-t"/>
    <param label="sequence line length" help="(-l)" name="l" type="integer" value="0"/>
  </inputs>
  <outputs>
    <data format_source="in_file" hidden="false" name="default" label="Selected sequences from $in_file.name">
      <change_format>
        <when input="t" value="-t" format="tabular"/>
      </change_format>
    </data>
  </outputs>
  <tests>
    <test>
      <param name="in_file" value="seqtk_subseq.fa"/>
      <param name="type" value="name"/>
      <param name="t" value="False" />
      <param name="name_list" value="seqtk_subseq_list.txt"/>
      <output name="default" file="seqtk_subseq.out" ftype="fasta"/>
    </test>
  </tests>
  <help><![CDATA[
**What it does**

Given a list of newline separated IDs from a fasta file, this will extract those named fasta sequences from the input file.

::

    # Input ID list
    seq1

    # Input fasta
    >seq1
    ACGTMRWSYK
    >seq2
    RWSYKACGTM

results in

::

    # Output result
    >seq1
    ACGTMRWSYK

@ATTRIBUTION@
]]></help>
</tool>

{'fraction_non_alphanumeric': 0.1743428984808295, 'fraction_numerical': 0.0043404870991077885, 'mean_word_length': 3.588495575221239, 'pattern_counts': {'":': 0, '<': 98, '<?xml version=': 2, '>': 106, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6618929', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1420, 'n_words': 355}