changeset 0:eb31f147bf4a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/ucsc_tools/maftools commit b4d87499a5677fbf611eedfa06c1b3d5cdc23914
author iuc
date Wed, 13 Aug 2025 21:16:21 +0000
parents
children 3b8eea04d99d
files mafFetch.xml test-data/componentFilter.txt test-data/filter_in.maf test-data/gorGor3.bed test-data/hg38.bed test-data/mafFetch.bed test-data/mafFrag_in.bed test-data/mafFrag_in12.bed test-data/mafIn.maf test-data/malformed.maf test-data/panTro4.bed test-data/ref.2bit test-data/ref.fa test-data/speciesFilter.txt
diffstat 14 files changed, 154 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mafFetch.xml	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,71 @@
+<tool id="ucsc_maffetch" name="mafFetch" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
+    <description>Get overlapping records from an MAF using an index table</description>
+    <macros>
+        <token name="@TOOL_VERSION@">482</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@PROFILE@">24.2</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">ucsc-maffetch</requirement>
+    </requirements>
+    <command detect_errors="exit_code">
+        <![CDATA[
+        cp '$ucsc_db_connection' "\${HOME}/.hg.conf" &&
+        chmod 600 "\${HOME}/.hg.conf" &&
+        mafFetch '$genome' '$track' '$bed_file' out.maf
+        ]]>
+    </command>
+    <configfiles>
+        <configfile name="ucsc_db_connection"><![CDATA[
+#European MariaDB server
+db.host=genome-euro-mysql.soe.ucsc.edu
+db.user=genomep
+db.password=password
+central.db=hgcentral
+central.host=genome-euro-mysql.soe.ucsc.edu
+central.user=genomep
+central.password=password
+gbdbLoc1=http://hgdownload.soe.ucsc.edu/gbdb/
+forceTwoBit=on 
+        ]]></configfile>
+    </configfiles>
+    <inputs>
+        <param name="bed_file" type="data" format="bed" label="Input BED file" help="Input BED file can be either BED6 or BED12"/>
+        <param name="genome" type="text" optional="false" label="Enter Genome database name" help="Name should match with the UCSC Table Browser Entries (For Eg. mm10, hg19, hg38)"/>
+        <param name="track" type="text" optional="false" label="Enter UCSC Table name for desired table of the above genome" help="Table name should match with the UCSC Table Browser Entries (For eg. knownGene, all_mrna)"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="maf" from_work_dir="out.maf" label="${tool.name} on ${on_string}:Output MAF"/>
+    </outputs>
+    <tests>
+        <!-- Test 01: Testing with default options -->
+        <test expect_num_outputs="1">
+            <param name="bed_file" value="mafFetch.bed"/>
+            <param name="genome" value="hg19"/>
+            <param name="track" value="multiz46way"/>
+            <output name="output" ftype="maf">
+                <assert_contents>
+                    <has_n_lines n="167"/>
+                    <has_size value="17364"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+mafFetch is a command-line tool from the UCSC Genome Browser suite that extracts MAF records overlapping regions in a BED file (minimum 3 columns: chrom, start, end) from a specified UCSC database table (e.g., multiz46way for hg19). Outputs alignments to a MAF file using an indexed lookup for efficiency.
+
+    ]]></help>
+        <citations>
+            <citation type="bibtex">
+                @misc{mafFetch,
+                author = {Kent UCSC},
+                title = {mafFetch: A tool for get overlapping records from an MAF using an index table},
+                note = {Tool for get overlapping records from an MAF using an index table}
+            </citation>
+    </citations>
+    <creator>
+        <person givenName="Saim" familyName="Momin" url="https://github.com/SaimMomin12" identifier="https://orcid.org/0009-0003-9935-828X"/>
+        <organization name="Galaxy Europe" url="https://galaxyproject.org/eu/"/>
+    </creator>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/componentFilter.txt	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,3 @@
+human.chr1
+mouse.chr1
+dog.chr1
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/filter_in.maf	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,32 @@
+##maf version=1 scoring=example
+a score=1000.0
+s human.chr1  100 10 + 1000 ACGTACGTAC
+s mouse.chr1  200 10 + 2000 ACGTACGTAC
+s dog.chr1    300 10 + 3000 ACGTACGTAC
+
+a score=500.0
+s human.chr2  150 5 + 1000 ACGTA
+s mouse.chr2  250 5 + 2000 ACGT-
+
+a score=200.0
+s human.chr3  200 15 + 1000 ACGTACGTACGTACG
+s cat.chr3    350 15 + 4000 ACGTACGTACGTACG
+s dog.chr3    450 15 + 5000 ACGTACGTACGTACG
+s rat.chr3    550 15 + 6000 ACGTACGTACGTACG
+
+a score=50.0
+s human.chr4  110 10 + 1000 ACGTACGTAC
+s mouse.chr4  210 10 + 2000 ACGTACGTAC
+
+a score=3000.0
+s human.chr5  105 10 + 1000 ACGTACGTAC
+s mouse.chr5  205 10 + 2000 ACGTACGTAC
+s dog.chr5    305 10 + 3000 ACGTACGTAC
+s cat.chr5    405 10 + 4000 ACGTACGTAC
+s rat.chr5    505 10 + 5000 ACGTACGTAC
+s cow.chr5    605 10 + 6000 ACGTACGTAC
+
+a score=600.0
+s human.chr6  100 10 + 1000 ACGTACGTAC
+s mouse.chr6  200 10 + 2000 ACGTACGTAC
+s dog.chr6    300 10 + 3000 ACGTACGTAC
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gorGor3.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,2 @@
+chr7    1006    1007
+chr7    1013    1014
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/hg38.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,2 @@
+chr7    1005    1006
+chr7    1010    1012
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mafFetch.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,1 @@
+chr17   7578370 7578550
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mafFrag_in.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,1 @@
+chr17	7571738	7590808	TP53	0	-
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mafFrag_in12.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,1 @@
+chr17	7571738	7590808	TP53	0	-	7572926	7579912	0	11	1188,1741,1921,1025,1000,398,900,896,900,900,8201	0,1188,2929,4850,5875,6875,7273,8173,9069,9969,10869
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mafIn.maf	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,5 @@
+##maf version=1 scoring=blastz
+a score=1234
+s hg38.chr7     1000 20 + 248956422 ACGTACGTACGTACGTACGT
+s panTro4.chr7  1000 20 + 159345973 ACGTAC-TAC-TACGTACGT
+s gorGor3.chr7  1000 20 + 174310764 A-GTACGTAC-TACG-AC-T
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/malformed.maf	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,32 @@
+##maf version=1 scoring=example
+a score=1000.0
+s human.chr1  100 10 + 1000 ACGTACGTAC
+s mouse.chr1  200 10 + 2000 ACGTACGTAC
+s dog.chr1    300 10 + 3000 ACGTACGTAC
+
+a score=500.0
+s human.chr2  150 5 + 1000 ACGTA
+s mouse.chr2  250 5 + 2000 ACGT-
+
+a score=200.0
+s human.chr3  200 15 + 1000 ACGTACGTACGTACG
+s cat.chr3    350 15 + 4000 ACGTACGTACGTACG
+s dog.chr3    450 15 + 5000 ACGTACGTACGTACG
+s rat.chr3    550 15 + 6000 ACGTACGTACGTACG
+
+a score=50.0
+s human.chr4  110 10 + 1000 ACGTACGTAC
+s mouse.chr4  210 10 + 2000 ACGTACGTAC
+
+a score=3000.0
+s human.chr5  105 10 + 1000 ACGTACGTAC
+s mouse.chr5  205 10 + 2000 ACGTACGTAC
+s dog.chr5    305 10 + 3000 ACGTACGTAC
+s cat.chr5    405 10 + 4000 ACGTACGTAC
+s rat.chr5    505 10 + 5000 ACGTACGTAC
+s cow.chr5    605 10 + 6000 ACGTACGTAC
+
+a score=600.0
+s human.chr6  100 10 + 1000 ACGTACGTAC
+s mouse.chr6  200 10 + 2000 ACGTACGTAC
+s dog.chr6    
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/panTro4.bed	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,1 @@
+chr7    1007    1008
\ No newline at end of file
Binary file test-data/ref.2bit has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref.fa	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,2 @@
+>chr7
+NNNNNACGTACGTACGTACGTNNNNNTGCACTGCACTGCACTGCANNNNN
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/speciesFilter.txt	Wed Aug 13 21:16:21 2025 +0000
@@ -0,0 +1,1 @@
+dog
\ No newline at end of file