Mercurial > repos > iuc > ucsc_chainprenet
changeset 0:fa0a3a618a57 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ucsc-tools/chainprenet commit d6679c64a483b6203166c246d40d72e46097be4a
author | iuc |
---|---|
date | Tue, 27 Aug 2024 10:25:05 +0000 |
parents | |
children | 7b0b810b495f |
files | chainprenet.xml test-data/fasta_indexes.loc test-data/hg38.chr20.chunk.fasta.fai test-data/input.chain test-data/mm39.chr2.chunk.fasta.fai test-data/out.chain tool-data/fasta_indexes.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test |
diffstat | 9 files changed, 464 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chainprenet.xml Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,112 @@ +<tool id="ucsc_chainprenet" name="chainPreNet" version="@TOOL_VERSION@+galaxy0" profile="21.05" license="MIT"> + <description> + Remove chains that don't have a chance of being netted + </description> + <macros> + <token name="@TOOL_VERSION@">377</token> + </macros> + <xrefs> + <xref type="bio.tools">UCSC_Genome_Browser_Utilities</xref> + </xrefs> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">ucsc-chainprenet</requirement> + </requirements> + <version_command><![CDATA[ echo "@TOOL_VERSION@" ]]></version_command> + <command detect_errors="exit_code"><![CDATA[ + chainPreNet + '$in_chain' + #if str( $target_reference_index_source.target_reference_index_source_selector ) == "history": + '${target_reference_index_source.in_tar_ref_index}' + #else: + '$target_reference_index_source.tar_ref_index_file.fields.path' + #end if + #if str( $query_reference_index_source.query_reference_index_source_selector ) == "history": + '${query_reference_index_source.in_que_ref_index}' + #else: + '$query_reference_index_source.que_ref_index_file.fields.path' + #end if + '$out' + #if str($pad) + -pad=$pad + #end if + $inclHap + ]]></command> + <inputs> + <param name="in_chain" format="chain" type="data" label="Chain dataset" help="Select chain dataset" /> + + <conditional name="target_reference_index_source"> + <param name="target_reference_index_source_selector" type="select" label="Choose the source for the target reference genome index"> + <option value="cached">Built-in</option> + <option value="history">From history</option> + </param> + <when value="cached"> + <param name="tar_ref_index_file" type="select" label="Using reference genome index"> + <options from_data_table="fasta_indexes" /> + </param> + </when> + <when value="history"> + <param name="in_tar_ref_index" format="tabular" type="data" label="Dataset with chrom sizes for target sequence. Typically a '.fai' file." /> + </when> + </conditional> + + <conditional name="query_reference_index_source"> + <param name="query_reference_index_source_selector" type="select" label="Choose the source for the query reference genome index"> + <option value="cached">Built-in</option> + <option value="history">From history</option> + </param> + <when value="cached"> + <param name="que_ref_index_file" type="select" label="Using reference genome index"> + <options from_data_table="fasta_indexes" /> + </param> + </when> + <when value="history"> + <param name="in_que_ref_index" format="tabular" type="data" label="Dataset with chrom sizes for query sequence. Typically a '.fai' file." /> + </when> + </conditional> + + <param argument="-pad" type="integer" min="0" optional="true" label="Extra to pad around blocks to decrease trash" help="Default 1" /> + <param argument="-inclHap" type="boolean" optional="true" truevalue="-inclHap" falsevalue="" label="Include query sequences name in the form *_hap*|*_alt*." help="Normally these are excluded from nets as being haplotype pseudochromosomes." /> + + </inputs> + <outputs> + <data name="out" format="chain" /> + </outputs> + <tests> + <test expect_num_outputs="1"> + <param name="in_chain" value="input.chain" /> + <param name="pad" value="1000" /> + <conditional name="target_reference_index_source"> + <param name="target_reference_index_source_selector" value="history" /> + <param name="in_tar_ref_index" value="hg38.chr20.chunk.fasta.fai"/> + </conditional> + <conditional name="query_reference_index_source"> + <param name="query_reference_index_source_selector" value="history" /> + <param name="in_que_ref_index" value="mm39.chr2.chunk.fasta.fai"/> + </conditional> + <output name="out" file="out.chain"/> + </test> + <test expect_num_outputs="1"> + <param name="in_chain" value="input.chain" /> + <param name="pad" value="1000" /> + <conditional name="target_reference_index_source"> + <param name="target_reference_index_source_selector" value="cached" /> + <param name="tar_ref_index_file" value="hg38.chr20.chunk"/> + </conditional> + <conditional name="query_reference_index_source"> + <param name="query_reference_index_source_selector" value="cached" /> + <param name="que_ref_index_file" value="mm39.chr2.chunk"/> + </conditional> + <output name="out" file="out.chain"/> + </test> + </tests> + <help><![CDATA[ +**What it does** + +`chainPreNet`_ is a tool to remove chains that don't have a chance of being netted + +.. _chainPreNet: http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/FOOTER.txt + ]]> </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/fasta_indexes.loc Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,2 @@ +hg38.chr20.chunk hg38 hg38.chr20.chunk ${__HERE__}/hg38.chr20.chunk.fasta.fai +mm39.chr2.chunk mm39 mm39.chr2.chunk ${__HERE__}/mm39.chr2.chunk.fasta.fai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/hg38.chr20.chunk.fasta.fai Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,1 @@ +hg38.chr20:10004760-11615810 1611050 30 1611050 1611051
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input.chain Tue Aug 27 10:25:05 2024 +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/mm39.chr2.chunk.fasta.fai Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,1 @@ +mm39.chr2:136351215-137822786 1471571 31 1471571 1471572
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out.chain Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,146 @@ +##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 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 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 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/tool-data/fasta_indexes.loc.sample Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,29 @@ +#This is a sample file distributed with Galaxy that enables tools +#to use a directory of Samtools indexed sequences data files. You will need +#to create these data files and then create a fasta_indexes.loc file +#similar to this one (store it in this directory) that points to +#the directories in which those files are stored. The fasta_indexes.loc +#file has this format (white space characters are TAB characters): +# +# <unique_build_id> <dbkey> <display_name> <file_base_path> +# +#So, for example, if you had hg19 Canonical indexed stored in +# +# /depot/data2/galaxy/hg19/sam/, +# +#then the fasta_indexes.loc entry would look like this: +# +#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /depot/data2/galaxy/hg19/sam/hg19canon.fa +# +#and your /depot/data2/galaxy/hg19/sam/ directory +#would contain hg19canon.fa and hg19canon.fa.fai files. +# +#Your fasta_indexes.loc file should include an entry per line for +#each index set you have stored. The file in the path does actually +#exist, but it should never be directly used. Instead, the name serves +#as a prefix for the index file. For example: +# +#hg18canon hg18 Human (Homo sapiens): hg18 Canonical /depot/data2/galaxy/hg18/sam/hg18canon.fai +#hg18full hg18 Human (Homo sapiens): hg18 Full /depot/data2/galaxy/hg18/sam/hg18full.fai +#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /depot/data2/galaxy/hg19/sam/hg19canon.fai +#hg19full hg19 Human (Homo sapiens): hg19 Full /depot/data2/galaxy/hg19/sam/hg19full.fai \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,7 @@ +<tables> + <!-- Location of SAMTools indexes for FASTA files --> + <table name="fasta_indexes" comment_char="#"> + <columns>value, dbkey, name, path</columns> + <file path="tool-data/fasta_indexes.loc" /> + </table> +</tables> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Tue Aug 27 10:25:05 2024 +0000 @@ -0,0 +1,7 @@ +<tables> + <!-- Location of SAMTools indexes for FASTA files --> + <table name="fasta_indexes" comment_char="#"> + <columns>value, dbkey, name, path</columns> + <file path="${__HERE__}/test-data/fasta_indexes.loc" /> + </table> +</tables> \ No newline at end of file