changeset 0:10ead977a5cf draft default tip

Uploaded
author a.gkanogiannis
date Tue, 06 Feb 2018 04:13:04 -0500
parents
children
files plink_ld_prune.sh plink_ld_prune.xml
diffstat 2 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plink_ld_prune.sh	Tue Feb 06 04:13:04 2018 -0500
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# usage : sh plink_ld_prune.sh <input VCF file> <output file prefix> <window size in snps or add kb> <step size> <r^2 threshold>
+
+plink=$(compgen -c plink)
+plink=$(which $plink)
+
+$plink --vcf $1 --allow-extra-chr --out $2 --indep-pairwise $3 $4 $5 &&
+$plink --vcf $1 --allow-extra-chr --recode vcf --extract $2.prune.in --out $2.pruned
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plink_ld_prune.xml	Tue Feb 06 04:13:04 2018 -0500
@@ -0,0 +1,38 @@
+<tool id="plink_ld_prune" name="Prune SNPs" version="0.1.0">
+  <description>on LD threshold (plink)</description>
+  <requirements>
+    <requirement type="package" version="1.9">plink</requirement>
+  </requirements>
+
+  <command interpreter="bash"><![CDATA[
+    plink_ld_prune.sh "${par1}" "output" "${par3}" "${par4}" "${par5}" &&
+    cp "output.pruned.vcf" "${output}"
+  ]]></command>
+  
+  
+  <inputs>
+    <param format="vcf" name="par1" type="data" label="Input VCF file"/>
+    <param name="par3" type="text" label="window size in snps or add kb"/>
+    <param name="par4" type="text" label="step size"/>
+    <param name="par5" type="text" label="r^2 threshold"/>
+  </inputs>
+  
+  <outputs>
+    <data format="vcf" name="output" />
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="par1" value="input.vcf"/>
+      <param name="par3" value="1000kb"/>
+      <param name="par4" value="5"/>
+      <param name="par5" value="0.25"/>
+      <output name="output" file="output.pruned.vcf"/>
+    </test>
+  </tests>
+
+  <help>
+    Prune SNPs on LD threshold (plink)
+  </help>
+
+</tool>