mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-08-30 16:58:03 +08:00
Remove outdated fimo wrapper and galaxy-sequence-utils dependency
The fimo tool was removed from `tool_conf.xml.sample` in 2014
(commit fa11d10c8b) and migrated to the
tools-iuc repository since 2015
( https://github.com/galaxyproject/tools-iuc/pull/499 ).
This bundled version doesn't probably work any more and is not
available on the UseGalaxy.* servers.
This allows us to remove `galaxy-sequence-utils` from the project
dependencies, since the other 2 tools
(`lib/galaxy/datatypes/converters/vcf_to_interval_index_converter.xml`
and `tools/maf/vcf_to_maf_customtrack.xml`) correctly specify it as a
requirement.
This commit is contained in:
@@ -72,7 +72,6 @@ frozenlist==1.4.1 ; python_version >= "3.8" and python_version < "3.13"
|
||||
fs==2.4.16 ; python_version >= "3.8" and python_version < "3.13"
|
||||
fsspec==2024.9.0 ; python_version >= "3.8" and python_version < "3.13"
|
||||
future==1.0.0 ; python_version >= "3.8" and python_version < "3.13"
|
||||
galaxy-sequence-utils==1.1.5 ; python_version >= "3.8" and python_version < "3.13"
|
||||
galaxy2cwl==0.1.4 ; python_version >= "3.8" and python_version < "3.13"
|
||||
graphene-sqlalchemy==3.0.0rc1 ; python_version >= "3.8" and python_version < "3.13"
|
||||
graphene==3.3 ; python_version >= "3.8" and python_version < "3.13"
|
||||
|
||||
@@ -115,8 +115,6 @@ check_untyped_defs = False
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy.tools.bundled.phenotype_association.pagetag]
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy.tools.bundled.meme.fimo_wrapper]
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy.tools.bundled.maf.maf_to_bed]
|
||||
check_untyped_defs = False
|
||||
[mypy-galaxy.tools.bundled.filters.trimmer]
|
||||
|
||||
@@ -60,7 +60,6 @@ edam-ontology = "*"
|
||||
fastapi-slim = ">=0.111.0"
|
||||
fs = "*"
|
||||
future = ">=1.0.0" # Python 3.12 support
|
||||
galaxy_sequence_utils = "*"
|
||||
graphene = "*"
|
||||
graphene-sqlalchemy = ">=3.0.0rc1" # need a beta release to be compat. with starlette plugin
|
||||
graphql-core = "*"
|
||||
|
||||
+9
-8
@@ -492,14 +492,15 @@ do
|
||||
-u|-unit|--unit)
|
||||
report_file="run_unit_tests.html"
|
||||
unit_extra='--doctest-modules
|
||||
--ignore lib/galaxy/jobs/runners/chronos.py
|
||||
--ignore lib/galaxy/model/migrations/alembic
|
||||
--ignore lib/galaxy/tools/bundled
|
||||
--ignore lib/galaxy/web/proxy/js/node_modules/
|
||||
--ignore lib/galaxy_test
|
||||
--ignore lib/tool_shed/test
|
||||
--ignore lib/tool_shed/webapp/controllers
|
||||
--ignore=lib/tool_shed/webapp/model/migrations/alembic/'
|
||||
--ignore lib/galaxy/datatypes/converters/
|
||||
--ignore lib/galaxy/jobs/runners/chronos.py
|
||||
--ignore lib/galaxy/model/migrations/alembic
|
||||
--ignore lib/galaxy/tools/bundled
|
||||
--ignore lib/galaxy/web/proxy/js/node_modules/
|
||||
--ignore lib/galaxy_test
|
||||
--ignore lib/tool_shed/test
|
||||
--ignore lib/tool_shed/webapp/controllers
|
||||
--ignore=lib/tool_shed/webapp/model/migrations/alembic/'
|
||||
generate_cwl_conformance_tests=1
|
||||
if [ $# -gt 1 ]; then
|
||||
unit_extra="$unit_extra $2"
|
||||
|
||||
@@ -1,238 +0,0 @@
|
||||
<tool id="meme_fimo" name="FIMO" version="0.0.1">
|
||||
<requirements><requirement type="package">meme</requirement></requirements>
|
||||
<description>- Find Individual Motif Occurrences</description>
|
||||
<command interpreter="python">fimo_wrapper.py 'fimo --o "${$html_outfile.files_path}" --verbosity "1"
|
||||
|
||||
#if str( $options_type.options_type_selector ) == 'advanced':
|
||||
--max-seq-length "${options_type.max_seq_length}"
|
||||
--max-stored-scores "${options_type.max_stored_scores }"
|
||||
--motif-pseudo "${options_type.motif_pseudo}"
|
||||
${options_type.norc}
|
||||
--output-pthresh "${options_type.output_pthresh}"
|
||||
|
||||
|
||||
#for $motif in $options_type.motifs:
|
||||
--motif "${motif.motif}"
|
||||
#end for
|
||||
|
||||
#if str( $options_type.bgfile_type.bgfile_type_selector ) == 'motif-file':
|
||||
--bgfile "motif-file"
|
||||
#elif str( $options_type.bgfile_type.bgfile_type_selector ) == 'motif-file':
|
||||
--bgfile "${options_type.bgfile_type.bgfile}"
|
||||
#end if
|
||||
|
||||
#if str( $options_type.qvalue_type.qvalue_type_selector ) == 'no-qvalue':
|
||||
--no-qvalue
|
||||
#else:
|
||||
--output-qthresh "${options_type.qvalue_type.output_qthresh}"
|
||||
#end if
|
||||
#end if
|
||||
|
||||
"${input_motifs}"
|
||||
|
||||
#if str( $fasta_type.fasta_type_selector ) == 'history':
|
||||
"${fasta_type.input_database}"
|
||||
#else:
|
||||
"${fasta_type.input_database.fields.path}"
|
||||
#end if
|
||||
|
||||
'
|
||||
|
||||
'${html_outfile.files_path}'
|
||||
|
||||
'${html_outfile}'
|
||||
|
||||
'${interval_outfile}'
|
||||
|
||||
'${txt_outfile}'
|
||||
|
||||
'${xml_outfile}'
|
||||
|
||||
'${gff_outfile}'
|
||||
|
||||
</command>
|
||||
<inputs>
|
||||
<param format="memexml" name="input_motifs" type="data" label="'MEME output' formatted file"/>
|
||||
|
||||
<conditional name="fasta_type">
|
||||
<param name="fasta_type_selector" type="select" label="Source for sequence to search">
|
||||
<option value="cached">Locally Cached sequences</option>
|
||||
<option value="history" selected="true">Sequences from your history</option>
|
||||
</param>
|
||||
<when value="cached">
|
||||
<param name="input_database" type="select" label="Genome to search">
|
||||
<options from_data_table="all_fasta">
|
||||
</options>
|
||||
</param>
|
||||
</when>
|
||||
<when value="history">
|
||||
<param format="fasta" name="input_database" type="data" label="Sequences"/>
|
||||
</when>
|
||||
</conditional>
|
||||
|
||||
<conditional name="options_type">
|
||||
<param name="options_type_selector" type="select" label="Options Configuration">
|
||||
<option value="basic" selected="true">Basic</option>
|
||||
<option value="advanced">Advanced</option>
|
||||
</param>
|
||||
<when value="basic">
|
||||
<!-- do nothing here -->
|
||||
</when>
|
||||
<when value="advanced">
|
||||
|
||||
<conditional name="bgfile_type">
|
||||
<param name="bgfile_type_selector" type="select" label="Background file type">
|
||||
<option value="motif-file">Use Frequencies from Motif File</option>
|
||||
<option value="default" selected="true">Use frequencies from non-redundant database (default)</option>
|
||||
<option value="bgfile">Use Frequencies from Background File</option>
|
||||
</param>
|
||||
<when value="motif-file">
|
||||
<!-- do nothing here -->
|
||||
</when>
|
||||
<when value="default">
|
||||
<!-- do nothing here -->
|
||||
</when>
|
||||
<when value="bgfile">
|
||||
<param name="bgfile" type="data" format="txt" optional="True" label="Background Model" />
|
||||
</when>
|
||||
</conditional>
|
||||
|
||||
<repeat name="motifs" title="Limit to specified motif">
|
||||
<param name="motif" type="text" value="" label="Specify motif by id" />
|
||||
</repeat>
|
||||
|
||||
<param name="max_seq_length" type="integer" value="250000000" label="Maximum input sequence length" />
|
||||
<param name="max_stored_scores" type="integer" value="100000" label="Maximum score count to store" />
|
||||
<param name="motif_pseudo" type="float" value="0.1" label="Pseudocount to add to counts in motif matrix" />
|
||||
<param name="norc" label="Do not check reverse complement" type="boolean" truevalue="--norc" falsevalue="" checked="False"/>
|
||||
<param name="output_pthresh" type="float" value="1e-4" label="p-value threshold" />
|
||||
|
||||
<conditional name="qvalue_type">
|
||||
<param name="qvalue_type_selector" type="select" label="q-value options">
|
||||
<option value="no-qvalue">Do not compute q-value</option>
|
||||
<option value="q-value" selected="true">Compute q-value</option>
|
||||
</param>
|
||||
<when value="no-qvalue">
|
||||
<!-- do nothing here -->
|
||||
</when>
|
||||
<when value="q-value">
|
||||
<param name="output_qthresh" type="float" value="1.0" label="q-value threshold" />
|
||||
</when>
|
||||
</conditional>
|
||||
|
||||
</when>
|
||||
</conditional>
|
||||
|
||||
<param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False">
|
||||
<validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
|
||||
</param>
|
||||
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data format="html" name="html_outfile" label="${tool.name} on ${on_string} (html)">
|
||||
<actions>
|
||||
<conditional name="fasta_type.fasta_type_selector">
|
||||
<when value="cached">
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="all_fasta" column="1" offset="0">
|
||||
<filter type="param_value" column="0" value="seq" keep="True"/>
|
||||
<filter type="param_value" ref="fasta_type.input_database" column="1"/>
|
||||
</option>
|
||||
</action>
|
||||
</when>
|
||||
</conditional>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="tabular" name="txt_outfile" label="${tool.name} on ${on_string} (text)">
|
||||
<actions>
|
||||
<conditional name="fasta_type.fasta_type_selector">
|
||||
<when value="cached">
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="all_fasta" column="1" offset="0">
|
||||
<filter type="param_value" ref="fasta_type.input_database" column="0"/>
|
||||
</option>
|
||||
</action>
|
||||
</when>
|
||||
</conditional>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="tabular" name="gff_outfile" label="${tool.name} on ${on_string} (almost-gff)">
|
||||
<actions>
|
||||
<conditional name="fasta_type.fasta_type_selector">
|
||||
<when value="cached">
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="all_fasta" column="1" offset="0">
|
||||
<filter type="param_value" ref="fasta_type.input_database" column="0"/>
|
||||
</option>
|
||||
</action>
|
||||
</when>
|
||||
</conditional>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="cisml" name="xml_outfile" label="${tool.name} on ${on_string} (xml)">
|
||||
<actions>
|
||||
<conditional name="fasta_type.fasta_type_selector">
|
||||
<when value="cached">
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="all_fasta" column="1" offset="0">
|
||||
<filter type="param_value" ref="fasta_type.input_database" column="0"/>
|
||||
</option>
|
||||
</action>
|
||||
</when>
|
||||
</conditional>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="interval" name="interval_outfile" label="${tool.name} on ${on_string} (interval)">
|
||||
<actions>
|
||||
<conditional name="fasta_type.fasta_type_selector">
|
||||
<when value="cached">
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="all_fasta" column="1" offset="0">
|
||||
<filter type="param_value" ref="fasta_type.input_database" column="0"/>
|
||||
</option>
|
||||
</action>
|
||||
</when>
|
||||
</conditional>
|
||||
</actions>
|
||||
</data>
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
<param name="input_motifs" value="meme/meme/meme_output_xml_1.xml" ftype="memexml"/>
|
||||
<param name="fasta_type_selector" value="history"/>
|
||||
<param name="input_database" value="phiX.fasta" ftype="fasta"/>
|
||||
<param name="options_type_selector" value="basic"/>
|
||||
<param name="non_commercial_use" value="True"/>
|
||||
<output name="html_outfile" file="meme/fimo/fimo_output_html_1.html" lines_diff="12"/>
|
||||
<output name="txt_outfile" file="meme/fimo/fimo_output_txt_1.txt" lines_diff="0"/>
|
||||
<output name="gff_outfile" file="meme/fimo/fimo_output_almost-gff_1.txt" lines_diff="0"/>
|
||||
<output name="xml_outfile" file="meme/fimo/fimo_output_xml_1.xml" lines_diff="8"/>
|
||||
<output name="interval_outfile" file="meme/fimo/fimo_output_interval_1.txt" lines_diff="0"/>
|
||||
</test>
|
||||
</tests>
|
||||
<help>
|
||||
|
||||
.. class:: warningmark
|
||||
|
||||
**WARNING: This tool is only available for non-commercial use. Use for educational, research and non-profit purposes is permitted. Before using, be sure to review, agree, and comply with the license.**
|
||||
|
||||
.. class:: infomark
|
||||
|
||||
**To cite FIMO:**
|
||||
`Grant CE, Bailey TL, Noble WS. FIMO: scanning for occurrences of a given motif. Bioinformatics. 2011 Apr 1;27(7):1017-8. <http://www.ncbi.nlm.nih.gov/pubmed/21330290>`_
|
||||
|
||||
|
||||
For detailed information on FIMO, click here_. To view the license_.
|
||||
|
||||
------
|
||||
|
||||
**Citation**
|
||||
|
||||
If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
|
||||
|
||||
|
||||
.. _here: http://meme.nbcr.net/meme/fimo-intro.html
|
||||
.. _license: http://meme.nbcr.net/meme/COPYRIGHT.html
|
||||
|
||||
</help>
|
||||
</tool>
|
||||
@@ -1,88 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Dan Blankenberg
|
||||
"""
|
||||
Read text output from FIMO and create an interval file.
|
||||
"""
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from galaxy_utils.sequence.transform import DNA_reverse_complement
|
||||
|
||||
buffsize = 1048576
|
||||
|
||||
|
||||
def stop_err(msg):
|
||||
sys.stderr.write(msg)
|
||||
sys.exit()
|
||||
|
||||
|
||||
def main():
|
||||
assert len(sys.argv) == 8, "Wrong number of arguments"
|
||||
sys.argv.pop(0)
|
||||
fimo_cmd = sys.argv.pop(0)
|
||||
html_path = sys.argv.pop(0)
|
||||
html_out = sys.argv.pop(0)
|
||||
interval_out = sys.argv.pop(0)
|
||||
txt_out = sys.argv.pop(0)
|
||||
xml_out = sys.argv.pop(0)
|
||||
gff_out = sys.argv.pop(0)
|
||||
|
||||
# run fimo
|
||||
try:
|
||||
tmp_stderr = tempfile.NamedTemporaryFile()
|
||||
proc = subprocess.Popen(args=fimo_cmd, shell=True, stderr=tmp_stderr)
|
||||
returncode = proc.wait()
|
||||
tmp_stderr.seek(0)
|
||||
stderr = ""
|
||||
try:
|
||||
while True:
|
||||
stderr += tmp_stderr.read(buffsize)
|
||||
if not stderr or len(stderr) % buffsize != 0:
|
||||
break
|
||||
except OverflowError:
|
||||
pass
|
||||
|
||||
if returncode != 0:
|
||||
raise Exception(stderr)
|
||||
except Exception as e:
|
||||
raise Exception("Error running FIMO:\n" + str(e))
|
||||
|
||||
shutil.move(os.path.join(html_path, "fimo.txt"), txt_out)
|
||||
shutil.move(os.path.join(html_path, "fimo.gff"), gff_out)
|
||||
shutil.move(os.path.join(html_path, "fimo.xml"), xml_out)
|
||||
shutil.move(os.path.join(html_path, "fimo.html"), html_out)
|
||||
|
||||
out_file = open(interval_out, "wb")
|
||||
out_file.write(
|
||||
"#%s\n"
|
||||
% "\t".join(
|
||||
("chr", "start", "end", "pattern name", "score", "strand", "matched sequence", "p-value", "q-value")
|
||||
)
|
||||
)
|
||||
for line in open(txt_out):
|
||||
if line.startswith("#"):
|
||||
continue
|
||||
fields = line.rstrip("\n\r").split("\t")
|
||||
start, end = int(fields[2]), int(fields[3])
|
||||
sequence = fields[7]
|
||||
if start > end:
|
||||
start, end = end, start # flip start and end, and set strand
|
||||
strand = "-"
|
||||
sequence = DNA_reverse_complement(
|
||||
sequence
|
||||
) # we want sequences relative to strand; FIMO always provides + stranded sequence
|
||||
else:
|
||||
strand = "+"
|
||||
start -= 1 # make 0-based start position
|
||||
out_file.write(
|
||||
"%s\n"
|
||||
% "\t".join((fields[1], str(start), str(end), fields[0], fields[4], strand, sequence, fields[5], fields[6]))
|
||||
)
|
||||
out_file.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user