PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/vcf_tools/extract.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 111 lines | 100 code | 11 blank | 0 comment | 0 complexity | 12d797d2d14dcacc4f270a8f78b4e343 MD5 | raw file
  1<tool id="vcf_extract" name="Extract" version="1.0.0">
  2  <description>reads from a specified region</description>
  3  <command interpreter="python">
  4    vcfPytools.py
  5      extract 
  6      --in=$input1
  7      --out=$output1
  8      #if $reference_sequence.value.strip()
  9        --reference-sequence=$reference_sequence
 10      #end if
 11      #if $region.value.strip()
 12        --region=$region
 13      #end if
 14      #if $keep_quality.value.strip()
 15        --keep-quality=$keep_quality
 16      #end if
 17      #if $keep_info.value.strip()
 18      --keep-info=$keep_info
 19      #end if
 20      #if $discard_info.value.strip()
 21        --discard-info=$discard_info
 22      #end if
 23      $pass_filter
 24  </command>
 25  <inputs>
 26    <param name="input1" label="VCF file" type="data" format="vcf" />
 27    <param name="reference_sequence" label="Extract records from this reference sequence" type="text" value='' />
 28    <param name="region" label="Extract records from this region" type="text" value='' help="The format of the region is ref:start..end, where the start and end coordinates are 1-based"/>
 29    <param name="keep_quality" label="Keep records containing this quality" type="text" value='' help="This requires two arguments: the quality value and a logical operator (eq - equals, le - less than or equal to, lt - less than, ge - greater than or equal to , gt - greater than) to determine which records to keep.  For example: '90 ge' will retain all records that have a quality of 90 or greater"/>
 30    <param name="keep_info" label="Keep records containing this info field" type="text" value='' />
 31    <param name="discard_info" label="Discard records containing this info field" type="text" value='' />
 32    <param name="pass_filter" label="Discard records whose filter field is not PASS" type="boolean" truevalue="--pass-filter" falsevalue="" checked="False"/>
 33  </inputs>
 34  <tests>
 35    <test>
 36      <param name="input1" value="test_filter_quality_9_DP_2000_lt.vcf" ftype="vcf" />
 37      <param name="reference_sequence" value='' />
 38	  <param name="region" value='' />
 39	  <param name="keep_quality" value='' />
 40	  <param name="keep_info" value='' />
 41	  <param name="discard_info" value='' />
 42	  <param name="pass_filter" value='true' />      
 43      <output name="output" file="test_extract_pass_filter_quality_9_DP_2000_lt.vcf" lines_diff="6" ftype="vcf" />
 44    </test>
 45    <test>
 46      <param name="input1" value="test.small.vcf" ftype="vcf" />
 47      <param name="reference_sequence" value='' />
 48      <param name="region" value='20:80000..100000' />
 49      <param name="keep_quality" value='' />
 50      <param name="keep_info" value='' />
 51      <param name="discard_info" value='' />
 52      <param name="pass_filter" value='false' />      
 53      <output name="output" file="test_extract_region_80000_100000.vcf" ftype="vcf" />
 54    </test>
 55    <test>
 56      <param name="input1" value="test.small.vcf" ftype="vcf" />
 57      <param name="reference_sequence" value='' />
 58      <param name="region" value='' />
 59      <param name="keep_quality" value='90 ge' />
 60      <param name="keep_info" value='' />
 61      <param name="discard_info" value='' />
 62      <param name="pass_filter" value='false' />      
 63      <output name="output" file="test_extract_quality_90_ge.vcf" ftype="vcf" />
 64    </test>
 65    <test>
 66      <param name="input1" value="test.small.vcf" ftype="vcf" />
 67      <param name="reference_sequence" value='' />
 68      <param name="region" value='' />
 69      <param name="keep_quality" value='' />
 70      <param name="keep_info" value='TV' />
 71      <param name="discard_info" value='' />
 72      <param name="pass_filter" value='false' />      
 73      <output name="output" file="test_extract_keep_info_TV.vcf" ftype="vcf" />
 74    </test>
 75    <test>
 76      <param name="input1" value="test.small.vcf" ftype="vcf" />
 77      <param name="reference_sequence" value='' />
 78      <param name="region" value='' />
 79      <param name="keep_quality" value='' />
 80      <param name="keep_info" value='' />
 81      <param name="discard_info" value='TV' />
 82      <param name="pass_filter" value='false' />      
 83      <output name="output" file="test_extract_discard_info_TV.vcf" ftype="vcf" />
 84    </test>
 85  </tests>
 86  <outputs>
 87    <data format="vcf" name="output1" label="${tool.name} from ${on_string}" />
 88  </outputs>
 89  <help>
 90
 91**What it does**
 92
 93This tool uses vcfPytools_' extract command to extract reads from a specified region of a VCF file
 94
 95.. _vcfPytools: https://github.com/AlistairNWard/vcfPytools
 96
 97Option **Extract records from this reference sequence** outputs all records from the specified reference sequence from the input vcf file into the output vcf file.
 98
 99Option **Extract records from this region** outputs all records from the specified region from the input vcf file into the output vcf file.  The format of the region is ref:start..end, where the start and end coordinates are 1-based.
100
101Option **Keep records containing this quality** allows only records with specified quality values to be retained.  This requires two arguments: the quality value and a logical operator (eq - equals, le - less than or equal to, lt - less than, ge - greater than or equal to , gt - greater than) to determine which records to keep.  For example: **90 ge** will retain all records that have a quality of 90 or greater.
102
103Option **Keep records containing this info field** allows all records to be removed unless they contain this value in the info field.
104
105Option **Discard records containing this info field** ensures that all records containing this value in the info field will not be included in the output file.  This cannot be used in conjunction with Keep info field to avoid conflict.
106
107Option **Discard records whose filter field is not PASS** will only output records that have the filter field populated with PASS.  All filtered records or records that haven't undergone filtering will be discarded.
108
109
110  </help>
111</tool>