miRTop / mirtop

command lines tool to annotate miRNAs with a standard mirna/isomir naming
https://mirtop.readthedocs.org
MIT License
18 stars 21 forks source link

Function to parse queries and apply to the GFF file #23

Open lpantano opened 6 years ago

lpantano commented 6 years ago

The idea is to have an option shared by many functions called --query, that allows filtering of the GFF format for:

And the function that parse the query value should be here: https://github.com/miRTop/mirtop/blob/dev/mirtop/gff/query.py

The idea should be something like this:

mirtop counts -i GFF -o OUTFOLDER --query "Filter == PASS and Name~/let-7/"

That should get the GFF file, apply the query filters, and then do whatever counts function makes.

This issue can be resolved with a single function that work with the --query value and a line of the GFF file, given TRUE or FALSE, depending on the query.

Test unit should be implemented at https://github.com/miRTop/mirtop/blob/dev/test/test_functions.py