Mercurial > repos > yusuf > filter_bam_list
diff FilterBAMByNamesList.xml @ 0:42af0b971c55 default tip
intial commit
author | Yusuf Ali <ali@yusuf.email> |
---|---|
date | Wed, 25 Mar 2015 13:33:46 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FilterBAMByNamesList.xml Wed Mar 25 13:33:46 2015 -0600 @@ -0,0 +1,43 @@ +<?xml version="1.0"?> + +<tool id="filter_bam_by_list_1" name="Filter a BAM file"> + <description>against a list of desired genomic regions, by name</description> + <version_string>echo 1.0.0</version_string> + <command interpreter="perl">filter_bam_by_list $bam_file $named_gene_regions_bed + ## Handle reference file. + #if $geneNameSource.source == "file": + $geneNameSource.file_of_names + #else: + "${geneNameSource.name_list}" + #end if + $filtered_bam_file $retained_regions_bed $samtools_messages</command> + <inputs> + <param format="bam" name="bam_file" type="data" label="Source BAM (mapped reads) file"/> + <param format="bed" name="named_gene_regions_bed" type="data" label="BED file with names for genomic regions (e.g. the UCSC hg19 refFlat gene names file available under 'Shared Data Libraries' -> 'Genomic coding sequence regions')"/> + <conditional name="geneNameSource"> + <param name="source" type="select" label="How would you like to specify the list of target region names?"> + <option value="file">A file</option> + <option value="list">A list</option> + </param> + <when value="file"> + <param format="text" name="file_of_names" type="data" label="Text file with target region names (usually gene names), one per line" help="Mapped reads in regions with any of these names are retained"/> + </when> + <when value="list"> + <param name="name_list" type="text" label="Space separated list of target region names (usually gene names)" help="Mapped reads in regions with any of these names are retained"/> + </when> + </conditional> + </inputs> + <outputs> + <data name="filtered_bam_file" format="bam" type="data" label="Reads mapped to target regions"/> + <data name="retained_regions_bed" format="bed" type="data" label="BED file of retained regions"/> + <data name="samtools_messages" format="text" type="data" label="Samtools messages"/> + </outputs> + + <tests/> + + <help> +This tool retains sequence reads of a BAM file that map to genomics regions matching any of the labels in the "names" file. This is useful for example to +report only a subset of an exome run that corresponds to a set of genes of interest. The names file should have one name per line. + </help> + +</tool>