changeset 0:6d5ab8d81db2 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/ucsc_tools/ucsc_netchainsubset commit 203061071dae562277de62b43680fc9bae853f35
author iuc
date Wed, 14 Jan 2026 09:16:58 +0000
parents
children
files netchainsubset.xml test-data/in.chain test-data/out.chain test-data/target.net
diffstat 4 files changed, 346 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netchainsubset.xml	Wed Jan 14 09:16:58 2026 +0000
@@ -0,0 +1,58 @@
+<tool id="ucsc_netchainsubset" name="netChainSubset" version="@TOOL_VERSION@+galaxy0" profile="21.05" license="MIT">
+    <description>
+        Create chain file with subset of chains that appear in the net
+    </description>
+    <macros>
+        <token name="@TOOL_VERSION@">482</token>
+    </macros>
+    <xrefs>
+        <xref type="bio.tools">UCSC_Genome_Browser_Utilities</xref>
+    </xrefs>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">ucsc-netchainsubset</requirement>
+    </requirements>
+    <version_command><![CDATA[ echo "@TOOL_VERSION@" ]]></version_command>
+    <command detect_errors="exit_code"><![CDATA[
+    netChainSubset
+        '$in_net'
+        '$in_chain'
+        '$out'
+        $splitOnInsert
+        $wholeChains
+        $skipMissing
+    ]]></command>
+    <inputs>
+        <param name="in_net" format="ucsc.net" type="data" label="net dataset" help="" />
+        <param name="in_chain" format="chain" type="data" label="chain dataset" help="" />
+        <param argument="-splitOnInsert" type="boolean" optional="true" truevalue="-splitOnInsert" falsevalue="" label="Split on insert" help="Split chain when get an insertion of another chain." />
+        <param argument="-wholeChains" type="boolean" optional="true" truevalue="-wholeChains" falsevalue="" label="Whole chains" help="Write entire chain references by net, don't split when a high-level net is encoundered.  This is useful when nets have been filtered." />
+        <param argument="-skipMissing" type="boolean" optional="true" truevalue="-skipMissing" falsevalue="" label="Skip missing chains" help="Skip chains that are not found instead of generating an error. Useful if chains have been filtered." />
+    </inputs>
+    <outputs>
+        <data name="out" format="chain" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="in_net" value="target.net" />
+            <param name="in_chain" value="in.chain" />
+            <output name="out" file="out.chain" />
+        </test>
+    </tests>
+    <help><![CDATA[
+**What it does**
+
+`netChainSubset`_ is a tool to create a `chain`_ file with subset of chains that appear in the net.
+This process creates so called `liftOver`_ file used to convert coordinates between asesemblies.
+
+For implementation details see netChainSubset's `source code`_.
+
+.. _netChainSubset: https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/FOOTER
+.. _net: https://genome.ucsc.edu/goldenPath/help/net.html
+.. _chain: https://genome.ucsc.edu/goldenPath/help/chain.html
+.. _liftOver: https://genome.ucsc.edu/goldenPath/help/hgTracksHelp.html#Liftover
+.. _source code: https://github.com/ucscGenomeBrowser/kent/blob/151a59e4e7526124ff096019c6c4052f0a900711/src/hg/mouseStuff/netChainSubset/netChainSubset.c
+    ]]>    </help>
+    <citations>
+        <citation type="doi">10.1093/bib/bbs038</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/in.chain	Wed Jan 14 09:16:58 2026 +0000
@@ -0,0 +1,159 @@
+##matrix=axtChain 16 91,-114,-31,-123,-114,100,-125,-31,-31,-125,100,-114,-123,-31,-114,91
+##gapPenalties=axtChain O=400 E=30
+chain 64329 hg38.chr20:10004760-11615810 1611050 + 879848 882025 mm39.chr2:136351215-137822786 1471571 - 648557 650527 2
+24	0	1
+52	12	0
+46	0	6
+24	1	0
+63	0	1
+6	0	9
+78	14	0
+25	0	4
+14	4	0
+4	19	0
+12	9	0
+43	77	0
+19	2	0
+37	2	0
+61	1	0
+16	0	4
+74	0	7
+51	1	0
+30	17	0
+18	1	0
+28	0	2
+125	0	13
+8	0	14
+8	0	3
+88	5	0
+35	0	1
+5	0	1
+6	0	7
+21	0	1
+27	4	0
+64	10	0
+46	2	0
+42	1	0
+54	0	1
+12	1	0
+115	3	0
+10	0	1
+27	1	0
+20	1	0
+42	21	0
+20	2	0
+50	11	0
+8	27	0
+45	1	0
+26	11	0
+5	3	0
+28	2	0
+34	1	0
+24	0	2
+39	1	0
+29	3	0
+68	17	0
+4	0	3
+29
+
+chain 13332 hg38.chr20:10004760-11615810 1611050 + 266744 267005 mm39.chr2:136351215-137822786 1471571 - 1226958 1227276 3
+17	0	14
+111	2	0
+42	3	0
+39	0	47
+31	0	1
+16
+
+chain 9256 hg38.chr20:10004760-11615810 1611050 + 288278 288554 mm39.chr2:136351215-137822786 1471571 + 260289 260601 4
+34	8	0
+38	0	2
+9	0	17
+11	0	24
+15	0	1
+161
+
+chain 8091 hg38.chr20:10004760-11615810 1611050 + 288114 288275 mm39.chr2:136351215-137822786 1471571 + 260754 260915 5
+161
+
+chain 6961 hg38.chr20:10004760-11615810 1611050 + 84589 84726 mm39.chr2:136351215-137822786 1471571 + 87751 87887 6
+83	1	0
+53
+
+chain 6916 hg38.chr20:10004760-11615810 1611050 + 87669 87836 mm39.chr2:136351215-137822786 1471571 + 87101 87269 7
+58	0	1
+109
+
+chain 5978 hg38.chr20:10004760-11615810 1611050 + 600994 601124 mm39.chr2:136351215-137822786 1471571 + 546215 546345 8
+130
+
+chain 5958 hg38.chr20:10004760-11615810 1611050 + 288132 288220 mm39.chr2:136351215-137822786 1471571 + 258580 258668 9
+88
+
+chain 5873 hg38.chr20:10004760-11615810 1611050 + 796556 796658 mm39.chr2:136351215-137822786 1471571 + 722616 722717 10
+31	1	0
+70
+
+chain 5421 hg38.chr20:10004760-11615810 1611050 + 890884 891032 mm39.chr2:136351215-137822786 1471571 - 646945 647095 11
+25	0	2
+123
+
+chain 4864 hg38.chr20:10004760-11615810 1611050 + 1425778 1425898 mm39.chr2:136351215-137822786 1471571 + 1342678 1342798 12
+120
+
+chain 4568 hg38.chr20:10004760-11615810 1611050 + 49202 49378 mm39.chr2:136351215-137822786 1471571 + 42266 42438 13
+99	4	0
+73
+
+chain 3681 hg38.chr20:10004760-11615810 1611050 + 640387 640507 mm39.chr2:136351215-137822786 1471571 + 579921 580041 14
+120
+
+chain 2152 hg38.chr20:10004760-11615810 1611050 + 148667 148736 mm39.chr2:136351215-137822786 1471571 + 158262 158331 15
+10	1	0
+38	0	1
+20
+
+chain 1838 hg38.chr20:10004760-11615810 1611050 + 469454 469477 mm39.chr2:136351215-137822786 1471571 + 409807 409830 16
+23
+
+chain 1399 hg38.chr20:10004760-11615810 1611050 + 796671 796752 mm39.chr2:136351215-137822786 1471571 + 722717 722799 17
+30	5	0
+8	3	0
+27	0	9
+8
+
+chain 1336 hg38.chr20:10004760-11615810 1611050 + 195854 195904 mm39.chr2:136351215-137822786 1471571 + 189780 189830 18
+50
+
+chain 1280 hg38.chr20:10004760-11615810 1611050 + 398052 398107 mm39.chr2:136351215-137822786 1471571 + 364812 364861 19
+11	1	0
+7	0	1
+15	6	0
+15
+
+chain 1248 hg38.chr20:10004760-11615810 1611050 + 195952 195990 mm39.chr2:136351215-137822786 1471571 + 189050 189087 20
+22	2	0
+5	0	1
+9
+
+chain 1208 hg38.chr20:10004760-11615810 1611050 + 1121156 1121254 mm39.chr2:136351215-137822786 1471571 + 1062631 1062720 21
+9	0	1
+12	7	0
+12	4	0
+13	0	1
+41
+
+chain 1201 hg38.chr20:10004760-11615810 1611050 + 580524 580629 mm39.chr2:136351215-137822786 1471571 + 516292 516362 22
+14	3	0
+16	19	0
+19	13	0
+21
+
+chain 1170 hg38.chr20:10004760-11615810 1611050 + 806859 806881 mm39.chr2:136351215-137822786 1471571 + 737566 737588 23
+22
+
+chain 1030 hg38.chr20:10004760-11615810 1611050 + 1532147 1532161 mm39.chr2:136351215-137822786 1471571 + 1423235 1423249 24
+14
+
+chain 1012 hg38.chr20:10004760-11615810 1611050 + 361832 361870 mm39.chr2:136351215-137822786 1471571 + 345076 345108 25
+20	6	0
+12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out.chain	Wed Jan 14 09:16:58 2026 +0000
@@ -0,0 +1,111 @@
+##matrix=axtChain 16 91,-114,-31,-123,-114,100,-125,-31,-31,-125,100,-114,-123,-31,-114,91
+##gapPenalties=axtChain O=400 E=30
+chain 4568 hg38.chr20:10004760-11615810 1611050 + 49202 49378 mm39.chr2:136351215-137822786 1471571 + 42266 42438 13
+99	4	0
+73
+
+chain 6961 hg38.chr20:10004760-11615810 1611050 + 84589 84726 mm39.chr2:136351215-137822786 1471571 + 87751 87887 6
+83	1	0
+53
+
+chain 6916 hg38.chr20:10004760-11615810 1611050 + 87669 87836 mm39.chr2:136351215-137822786 1471571 + 87101 87269 7
+58	0	1
+109
+
+chain 2152 hg38.chr20:10004760-11615810 1611050 + 148667 148736 mm39.chr2:136351215-137822786 1471571 + 158262 158331 15
+10	1	0
+38	0	1
+20
+
+chain 13332 hg38.chr20:10004760-11615810 1611050 + 266744 267005 mm39.chr2:136351215-137822786 1471571 - 1226958 1227276 3
+17	0	14
+111	2	0
+42	3	0
+39	0	47
+31	0	1
+16
+
+chain 8091 hg38.chr20:10004760-11615810 1611050 + 288114 288275 mm39.chr2:136351215-137822786 1471571 + 260754 260915 5
+161
+
+chain 9256 hg38.chr20:10004760-11615810 1611050 + 288278 288554 mm39.chr2:136351215-137822786 1471571 + 260289 260601 4
+34	8	0
+38	0	2
+9	0	17
+11	0	24
+15	0	1
+161
+
+chain 5978 hg38.chr20:10004760-11615810 1611050 + 600994 601124 mm39.chr2:136351215-137822786 1471571 + 546215 546345 8
+130
+
+chain 3681 hg38.chr20:10004760-11615810 1611050 + 640387 640507 mm39.chr2:136351215-137822786 1471571 + 579921 580041 14
+120
+
+chain 5873 hg38.chr20:10004760-11615810 1611050 + 796556 796658 mm39.chr2:136351215-137822786 1471571 + 722616 722717 10
+31	1	0
+70
+
+chain 64329 hg38.chr20:10004760-11615810 1611050 + 879848 882025 mm39.chr2:136351215-137822786 1471571 - 648557 650527 2
+24	0	1
+52	12	0
+46	0	6
+24	1	0
+63	0	1
+6	0	9
+78	14	0
+25	0	4
+14	4	0
+4	19	0
+12	9	0
+43	77	0
+19	2	0
+37	2	0
+61	1	0
+16	0	4
+74	0	7
+51	1	0
+30	17	0
+18	1	0
+28	0	2
+125	0	13
+8	0	14
+8	0	3
+88	5	0
+35	0	1
+5	0	1
+6	0	7
+21	0	1
+27	4	0
+64	10	0
+46	2	0
+42	1	0
+54	0	1
+12	1	0
+115	3	0
+10	0	1
+27	1	0
+20	1	0
+42	21	0
+20	2	0
+50	11	0
+8	27	0
+45	1	0
+26	11	0
+5	3	0
+28	2	0
+34	1	0
+24	0	2
+39	1	0
+29	3	0
+68	17	0
+4	0	3
+29
+
+chain 5421 hg38.chr20:10004760-11615810 1611050 + 890884 891032 mm39.chr2:136351215-137822786 1471571 - 646945 647095 11
+25	0	2
+123
+
+chain 4864 hg38.chr20:10004760-11615810 1611050 + 1425778 1425898 mm39.chr2:136351215-137822786 1471571 + 1342678 1342798 12
+120
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/target.net	Wed Jan 14 09:16:58 2026 +0000
@@ -0,0 +1,18 @@
+##matrix=axtChain 16 91,-114,-31,-123,-114,100,-125,-31,-31,-125,100,-114,-123,-31,-114,91
+##gapPenalties=axtChain O=400 E=30
+net hg38.chr20:10004760-11615810 1611050
+ fill 49202 176 mm39.chr2:136351215-137822786 + 42266 172 id 13 score 4568 ali 172
+ fill 84589 137 mm39.chr2:136351215-137822786 + 87751 136 id 6 score 6961 ali 136
+ fill 87669 167 mm39.chr2:136351215-137822786 + 87101 168 id 7 score 6916 ali 167
+ fill 148667 69 mm39.chr2:136351215-137822786 + 158262 69 id 15 score 2152 ali 68
+ fill 266744 261 mm39.chr2:136351215-137822786 - 244295 318 id 3 score 13332 ali 256
+ fill 288114 161 mm39.chr2:136351215-137822786 + 260754 161 id 5 score 8091 ali 161
+ fill 288278 276 mm39.chr2:136351215-137822786 + 260289 312 id 4 score 9256 ali 268
+ fill 600994 130 mm39.chr2:136351215-137822786 + 546215 130 id 8 score 5978 ali 130
+ fill 640387 120 mm39.chr2:136351215-137822786 + 579921 120 id 14 score 3681 ali 120
+ fill 796556 102 mm39.chr2:136351215-137822786 + 722616 101 id 10 score 5873 ali 101
+ fill 879848 2177 mm39.chr2:136351215-137822786 - 821044 1970 id 2 score 64329 ali 1889
+  gap 880298 77 mm39.chr2:136351215-137822786 - 822602 0
+  gap 881628 27 mm39.chr2:136351215-137822786 - 821380 0
+ fill 890884 148 mm39.chr2:136351215-137822786 - 824476 150 id 11 score 5421 ali 148
+ fill 1425778 120 mm39.chr2:136351215-137822786 + 1342678 120 id 12 score 4864 ali 120