Mercurial > repos > devteam > picard_122_up
diff picard_ReorderSam.xml @ 0:b76a4f17bbbb draft
Uploaded
author | devteam |
---|---|
date | Thu, 23 Oct 2014 11:31:30 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/picard_ReorderSam.xml Thu Oct 23 11:31:30 2014 -0400 @@ -0,0 +1,131 @@ +<tool name="ReorderSam" id="picard_ReorderSam" version="1.122.0"> + <description>reorder reads to match ordering in reference sequences</description> + <requirements><requirement type="package" version="1.122.0">picard</requirement></requirements> + + <macros> + <import>picard_macros.xml</import> + </macros> + + <command> + @java_options@ + #set $picard_dict = "localref.dict" + #set $ref_fasta = "localref.fa" ## This is done because picards "likes" .fa extension + + ln -s "${reference_source.ref_file}" "${ref_fasta}" && + + #if str( $reference_source.reference_source_selector ) == "history": + + java -jar \$JAVA_JAR_PATH/CreateSequenceDictionary.jar REFERENCE="${ref_fasta}" OUTPUT="${picard_dict}" + QUIET=true + VERBOSITY=ERROR + + && + + #else: + + #set $ref_fasta = str( $reference_source.ref_file.fields.path ) + + #end if + + java -jar \$JAVA_JAR_PATH/ReorderSam.jar + INPUT="${inputFile}" + OUTPUT="${outFile}" + REFERENCE="${ref_fasta}" + ALLOW_INCOMPLETE_DICT_CONCORDANCE="${allow_incomplete_dict_concordance}" + ALLOW_CONTIG_LENGTH_DISCORDANCE="${allow_contig_length_discordance}" + + VALIDATION_STRINGENCY="${validation_stringency}" + QUIET=true + VERBOSITY=ERROR + + </command> + + <inputs> + + <conditional name="reference_source"> + <param name="reference_source_selector" type="select" label="Load reference genome from"> + <option value="cached">Local cache</option> + <option value="history">History</option> + </param> + <when value="cached"> + <param name="ref_file" type="select" label="Use dictionary from the list" help="Select genome from the list"> + <options from_data_table="picard_indexes"> + <filter type="sort_by" column="2" /> + <validator type="no_options" message="No indexes are available" /> + </options> + <validator type="no_options" message="A built-in dictionary is not available for the build associated with the selected input file"/> + </param> + </when> + <when value="history"> + <param name="ref_file" type="data" format="fasta" label="Use the following dataset to create dictionary" help="You can upload a FASTA sequence to the history from which Picard will automatically generate dictionary using CreateSequenceDictionary command" /> + </when> + </conditional> + + <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/> + <param name="allow_incomplete_dict_concordance" type="boolean" label="If true, then allows only a partial overlap of the BAM contigs with the new reference sequence contigs" help="ALLOW_INCOMPLETE_DICT_CONCORDANCE; By default, this tool requires a corresponding contig in the new reference for each read contig; default=False"/> + <param name="allow_contig_length_discordance" type="boolean" label="If true, then permits mapping from a read contig to a new reference contig with the same name but a different length" help="ALLOW_CONTIG_LENGTH_DISCORDANCE; HIGHLY DANGEROUS! Only use if you know what you are doing; default=False"/> + <expand macro="VS" /> + + </inputs> + <outputs> + <data name="outFile" format="bam" label="${tool.name} on ${on_string}: Reordered BAM"/> + </outputs> + <tests> + <test> + <param name="reference_source_selector" value="history" /> + <param name="ref_file" value="picard_ReorderSam_ref.fa" ftype="fasta" /> + <param name="inputFile" value="picard_ReorderSam.bam" ftype="bam"/> + <param name="allow_incomplete_dict_concordance" value="false"/> + <param name="allow_contig_length_discordance" value="false"/> + <output name="outFile" file="picard_ReorderSam_test1.bam" ftype="bam" lines_diff="2"/> + </test> + </tests> + + <stdio> + <exit_code range="1:" level="fatal"/> + </stdio> + + <help> + +.. class:: infomark + +**Purpose** + +ReorderSam reorders reads in a SAM/BAM file to match the contig ordering in a provided reference file, as determined by exact name matching of contigs. Reads mapped to contigs absent in the new reference are dropped. + +@dataset_collections@ + +---- + +.. class:: warningmark + +Not to be confused with **SortSam**. + +@description@ + + ALLOW_INCOMPLETE_DICT_CONCORDANCE=Boolean + S=Boolean If true, then allows only a partial overlap of the BAM contigs with the new reference + sequence contigs. By default, this tool requires a corresponding contig in the new + reference for each read contig Default value: false. Possible values: {true, false} + + ALLOW_CONTIG_LENGTH_DISCORDANCE=Boolean + U=Boolean If true, then permits mapping from a read contig to a new reference contig with the same + name but a different length. Highly dangerous, only use if you know what you are doing. + Default value: false. Possible values: {true, false} + +@more_info@ + </help> +</tool> + + + + + + + + + + + + +