Mercurial > repos > jackcurragh > ribogalaxy_get_chrom_sizes
view get_chrom_sizes/get_chrom_sizes.xml @ 36:ecf172071e80 draft
Uploaded
author | jackcurragh |
---|---|
date | Fri, 23 Sep 2022 14:19:34 +0000 |
parents | 6932d7b12b41 |
children | 14ae3bb73e02 |
line wrap: on
line source
<tool id="get_chrom_sizes" name="Get Chromosome Sizes" version="2.8"> <description>Generates a TAB Delimited chrom.sizes File from an Inputted FASTA</description> <command> #if $refGenomeSource.genomeSource == "builtin": cat "#chrom\tlength" > $output1 cat ${refGenomeSource.input1_builtin.fields.path} | awk '$0 ~ ">" {if (NR > 1) {print c;} c=0; printf ${input2} substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END {print c; }' | cat >> $output1 #else: cat ${refGenomeSource.input1_file} | awk '$0 ~ ">" {if (NR > 1) {print c;} c=0; printf ${input2} substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END {print c; }' | cat > $output1 #end if </command> <inputs> <conditional name="refGenomeSource"> <param name="genomeSource" type="select" label="Will you select a reference from your history or use a built-in FASTA?"> <option value="builtin">Use a built-in FASTA</option> <option value="history">Use one from the history</option> </param> <when value="builtin"> <param name="input1_builtin" type="select" format="fasta" label="Select a reference" help="if your reference of interest is not listed - contact RiboGalaxy team"> <options from_data_table="builtin_fastas"> <filter type="sort_by" column="2" /> <validator type="no_options" message="No built-ins are available" /> </options> </param> </when> <when value="history"> <param name="input1_file" type="data" format="fasta" label="FASTA File" /> </when> </conditional> <param name="input2" type="select" label="Chromosome Column Prefix (eg. chr)"> <option value="chr">'chr' (required for upload to GWIPS-Viz)</option> <option value="" selected='true'>None - do not add a prefix</option> </param> </inputs> <outputs> <data name="output1" format="tabular"/> </outputs> <tests> <test> <param name="input1" value="test.fasta" ftype="fasta" /> <param name="input2" value="chr"/> <output name="output1" file="test.fasta.sizes" ftype="tabular" lines_diff="4" /> </test> </tests> <help> **What it does** Creates a chromosome sizes file from a fasta file. This is needed for creating ribosome profiles. Some commonly used genomes are provided to save on storage. </help> <citations/> </tool>