/tools/filters/gff/gtf_filter_by_attribute_values_list.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 42 lines · 38 code · 2 blank · 2 comment · 0 complexity · 63b93a76b0309346041a9d5ed3947537 MD5 · raw file

  1. <tool id="gtf_filter_by_attribute_values_list" name="Filter GTF data by attribute values_list" version="0.1">
  2. <description></description>
  3. <command interpreter="python">
  4. gtf_filter_by_attribute_values_list.py $input $attribute_name $ids $output
  5. </command>
  6. <inputs>
  7. <param format="gtf" name="input" type="data" label="Filter"/>
  8. <param name="attribute_name" type="select" label="Using attribute name">
  9. <option value="gene_id">gene_id</option>
  10. <option value="transcript_id">transcript_id</option>
  11. <option value="p_id">p_id</option>
  12. <option value="tss_id">tss_id</option>
  13. </param>
  14. <param format="tabular,txt" name="ids" type="data" label="And attribute values"/>
  15. </inputs>
  16. <outputs>
  17. <data format="gtf" name="output"/>
  18. </outputs>
  19. <tests>
  20. <!-- Test filtering with a simple list of values. -->
  21. <test>
  22. <param name="input" value="gops_subtract_in1.gff"/>
  23. <param name="attribute_name" value="gene_id"/>
  24. <param name="ids" value="gtf_filter_by_attribute_values_list_in1.txt"/>
  25. <output name="output" file="gtf_filter_by_attribute_values_list_out1.gtf"/>
  26. </test>
  27. <!-- Test filtering with a more complex tabular file. -->
  28. <test>
  29. <param name="input" value="gtf_filter_by_attribute_values_list_in2.gtf"/>
  30. <param name="attribute_name" value="transcript_id"/>
  31. <param name="ids" value="gtf_filter_by_attribute_values_list_in3.tabular"/>
  32. <output name="output" file="gtf_filter_by_attribute_values_list_out2.gtf"/>
  33. </test>
  34. </tests>
  35. <help>
  36. This tool filters a GTF file using a list of attribute values. The attribute values are
  37. taken from the first column in the file; additional columns in the file are ignored. An example
  38. use of this tool is to filter a GTF file using a list of transcript_ids or gene_ids obtained from Cuffdiff.
  39. </help>
  40. </tool>