Previous changeset 0:ec2bc87ebd7b (2021-11-16) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/king/ commit 1c50106137c5b3260f18864ac9084056fa91ec80" |
modified:
king.xml |
added:
test-data/king_pcplot.png test-data/subset_bed.sh test-data/test.model |
b |
diff -r ec2bc87ebd7b -r 1932808c6fab king.xml --- a/king.xml Tue Nov 16 20:14:31 2021 +0000 +++ b/king.xml Mon Apr 18 18:04:56 2022 +0000 |
[ |
b'@@ -2,82 +2,266 @@\n <tool id="king" name="KING" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">\n <description>Kinship-based INference for GWAS</description>\n <macros>\n- <token name="@TOOL_VERSION@">2.2.4</token>\n+ <token name="@TOOL_VERSION@">2.2.7</token>\n <token name="@VERSION_SUFFIX@">0</token>\n </macros>\n <requirements>\n <requirement type="package" version="@TOOL_VERSION@">king</requirement>\n- <requirement type="package" version="1.6.4">r-kinship2</requirement>\n- <requirement type="package" version="1.2.2">r-igraph</requirement>\n+ <requirement type="package" version="1.8.5">r-kinship2</requirement>\n+ <requirement type="package" version="1.3.0">r-igraph</requirement>\n+ <requirement type="package" version="1.7_9">r-e1071</requirement>\n </requirements>\n <version_command>\n king | head -1 | cut -d\' \' -f 2\n </version_command>\n <command detect_errors="exit_code"><![CDATA[\n ln -s \'$genotype\' input.bed &&\n- ln -s \'$family\' input.fam &&\n- ln -s \'$map\' input.bim &&\n \n- king -b input.bed --fam input.fam --bim input.bim\n- $related\n- $duplicate\n- $kinship\n- $ibdseg\n- $ibs\n- $homog\n- #if str($degree):\n- --degree $degree\n+ #if $opt_int.family:\n+ ln -s \'$opt_int.family\' input.fam &&\n+ #end if\n+ #if $opt_int.map:\n+ ln -s \'$opt_int.map\' input.bim &&\n+ #end if\n+ #if $gen_rsk.model:\n+ ln -s \'$gen_rsk.model\' input.model &&\n+ #end if\n+ ## General Input\n+ king -b input.bed\n+ ## Close Relative Inference\n+ $close_rel_i.related\n+ $close_rel_i.duplicate\n+ ## Pairwise Relatedness Inference\n+ $pair_rel_i.kinship\n+ $pair_rel_i.ibdseg\n+ $pair_rel_i.ibs\n+ $pair_rel_i.homog\n+ ## Inference Parameter\n+ #if str($inf_param.degree):\n+ --degree $inf_param.degree\n+ #end if\n+ #if str($inf_param.seglength):\n+ --seglength $inf_param.seglength\n+ #end if\n+ ## Relationship Application\n+ $rel_app.unrelated\n+ $rel_app.cluster\n+ $rel_app.build\n+ ## QC Report\n+ #if str($qc_rep.callrateN):\n+ --callrateN $callrateN\n+ #end if\n+ #if str($qc_rep.callrateM):\n+ --callrateM $callrateM\n+ #end if\n+ ## Population Structure\n+ $pop_str.pca\n+ $pop_str.mds\n+ ## Structure Parameter\n+ #if str($str_par.pcs)\n+ --pcs $str_par.pcs\n #end if\n- #if str($projection):\n- --projection $projection\n+ #if str($str_par.projection)\n+ --projection $str_par.projection\n+ #end if\n+ ## Disease Assosciation\n+ $dis_ass.tdt\n+ ## Quantitiative Trait Association\n+ $qnt_trt.mtscore\n+ ## Association Model\n+ #if str($ass_mod.trait)\n+ --trait $ass_mod.trait\n+ #end if\n+ #if str($ass_mod.covariate)\n+ --covariate $ass_mod.covariate\n+ #end if\n+ ## Association parameter\n+ $ass_par.invnorm\n+ #if str($ass_par.maxP)\n+ --maxP $ass_par.maxP\n #end if\n- $unrelated\n- $build\n- $cluster\n- $rplot\n-\n+ ## Genetic Risk Score\n+ $gen_rsk.risk\n+ #if $gen_rsk.model:\n+ --model input.model\n+ #end if\n+ #if str($gen_rsk.prevalence)\n+ --prevalence $gen_rsk.prevalence\n+ #end if\n+ $gen_rsk.noflip\n+ ## Computing parameter\n+ --cpus "\\${GALAXY_SLOTS:-4}"\n+ ## Optional Input\n+ #if $opt_int.family\n+ --fam input.fam\n+ #end if\n+ #if $opt_int.map\n+ --bim input.bim\n+ #end if\n+ #if $opt_int.sexchr\n+ --sexchr $opt_int.sexchr\n+ #end if\n+ ## Output\n+ $opt_par.rplot\n+ $opt_par.pngplot\n+ $opt_par.plink\n > \'$kingoutlog\'\n ]]></command>\n <inputs>\n- <param name="genotype" type="data" format="pbed,binary" label="Binary Genotype File" />\n- <param name="family" type="data" format="lped,txt" label="Family File" />\n- <param name="map" type="data" format="tabular" label="Map File" />\n+ <param name="genotype" type="data" format="pbed" label="Binary Gen'..b'd">\n+ <param name="covariate" value="," />\n+ </section>\n+ <section name="qnt_trt" >\n+ <param name="mtscore" value="false"/>\n+ </section>\n+ <section name="ass_par">\n+ <param name="invnorm" value="true" />\n+ <param name="maxP" value="5e-8"/>\n+ </section>\n+ <param name="use_log" value="true" />\n+ <output name="kingoutlog" >\n+ <assert_contents>\n+ <has_text_matching expression="Inference\\s+0\\s+1\\s+1\\s+0" />\n+ </assert_contents>\n+ </output>\n+ <output_collection name="kingoutput_txt" count="3" >\n+ <element name="allsegs" >\n+ <assert_contents>\n+ <has_text_matching expression="1\\s+1\\s+51\\.\\d+\\s+95\\.\\d+\\s+44\\.\\d+\\s+294\\s+rs7534689\\s+rs1858111" />\n+ </assert_contents>\n+ </element>\n+ <element name="kin0" >\n+ <assert_contents>\n+ <has_text_matching expression="FID1\\s+ID1\\s+FID2\\s+ID2\\s+N_SNP\\s+HetHet\\s+IBS0\\s+HetConc\\s+HomIBS0\\s+Kinship\\s+IBD1Seg\\s+IBD2Seg\\s+PropIBD\\s+InfType" />\n+ </assert_contents>\n+ </element>\n+ </output_collection>\n+ </test>\n+ <test expect_num_outputs="4" > <!-- ancestry inferrence -->\n+ <param name="genotype" value="new.6000.bed"/>\n+ <section name="opt_int" >\n+ <param name="family" value="new.6000.fam"/>\n+ <param name="map" value="new.6000.bim"/>\n+ </section>\n+ <section name="pop_str">\n+ <param name="pca" value="true" />\n+ </section>\n+ <section name="str_par" >\n+ <param name="projection" value="1"/>\n+ </section>\n+ <section name="opt_par">\n+ <param name="rplot" value="true"/>\n+ <param name="pngplot" value="true"/>\n+ </section>\n+ <param name="use_log" value="true" />\n+ <output name="kingoutlog">\n+ <assert_contents>\n+ <has_text_matching expression="10\\s+eigenvalues:\\s+581\\.\\d+\\s+114\\.\\d+\\s+112\\.\\d+\\s+111\\.\\d+\\s+109\\.\\d+\\s+109\\.\\d+\\s+108\\.\\d+\\s+108\\.\\d+\\s+107\\.\\d+\\s+107\\.\\d+" />\n+ </assert_contents>\n+ </output>\n+ <output_collection name="kingoutput_txt" count="3" >\n+ <element name="pc">\n+ <assert_contents>\n+ <has_text_matching expression="Y117\\s+NA19239\\s+0\\s+0\\s+1\\s+1\\s+.*" />\n+ </assert_contents>\n+ </element>\n+ </output_collection>\n+ <output_collection name="kingoutput_log" count="2" />\n+ <output_collection name="kingoutput_pdf" count="1" >\n+ <element name="pcplot" value="king_pcplot.png" compare="sim_size" delta="2500" />\n+ </output_collection>\n+ </test>\n </tests>\n <help><![CDATA[\n \n- `KING <http://people.virginia.edu/~wc9c/KING/>`_ is a toolset that makes use of high-throughput SNP data typically seen in a genome-wide association study (GWAS)\n- or a sequencing project. Applications of KING include family relationship inference and pedigree error checking,\n- quality control, population substructure identification, forensics, gene mapping, etc.\n+ `KING <http://people.virginia.edu/~wc9c/KING/>`_ is a toolset that makes use of\n+ high-throughput SNP data typically seen in a genome-wide association study (GWAS) or a\n+ sequencing project. Applications of KING include family relationship inference and\n+ pedigree error checking, quality control, population substructure identification,\n+ forensics, gene mapping, etc.\n \n ]]>\n </help>\n@@ -326,3 +696,4 @@\n <citation type="doi">10.1093/bioinformatics/btq559</citation>\n </citations>\n </tool>\n+\n' |
b |
diff -r ec2bc87ebd7b -r 1932808c6fab test-data/king_pcplot.png |
b |
Binary file test-data/king_pcplot.png has changed |
b |
diff -r ec2bc87ebd7b -r 1932808c6fab test-data/subset_bed.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/subset_bed.sh Mon Apr 18 18:04:56 2022 +0000 |
b |
@@ -0,0 +1,20 @@ +binary_file=ex.bed +target_markers=6000 +target_cols=$(( 6 + ( $target_markers * 2 ))) + +dec_prefix=out +subs_prefix=sub +new_prefix="new."${target_markers} + +##conda activate plink +## Extract binary file into new map, ped, and fam files +plink --bfile $(basename $binary_file .bed) --recode --out ${dec_prefix} + +## Subset ped and map +cat ${dec_prefix}.ped | cut -d' ' -f 1-${target_cols} > ${subs_prefix}.ped +head ${dec_prefix}.map -n ${target_markers} > ${subs_prefix}.map + +## Recode into new +plink --file ${subs_prefix} --out ${new_prefix} +echo ${new_prefix}* +##conda deactivate |
b |
diff -r ec2bc87ebd7b -r 1932808c6fab test-data/test.model --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/test.model Mon Apr 18 18:04:56 2022 +0000 |
b |
@@ -0,0 +1,9 @@ +SNP EA AF WT CHR POS OA +rs326468 A 0.131 1.702 6 32626272 C +rs6596679 G 0.095 1.801 6 32591213 A +rs1500238 T 0.076 1.367 6 32605884 C +rs664978 T 0.345 0.839 6 32583299 C +rs1161240 C 0.216 1.079 6 32450613 A +rs2602970 T 0.265 0.403 11 2182224 A +rs1161312 C 0.459 0.295 17 38066240 T + |