# HG changeset patch # User morinlab # Date 1476210719 14400 # Node ID 73338a1805e7ad8ccce531775aa9238910f69115 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty diff -r 000000000000 -r 73338a1805e7 create_seqz_file.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/create_seqz_file.xml Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,140 @@ + + + extracts the common positions containing A and B allele frequencies + + + sequenza + pypy + SEQUENZA_INSTALL_DIR + +> $bytes; + #end if + for int in \$( cat $interval ); do + #end if + + #if $interval and $order_file + if [ "\$int" != "\$( cat $order_file | head -n1)" ] ; then + skip=2; + else + skip=1; + fi ; + #end if + + \$EXEC \$SEQUENZA_INSTALL_DIR/sequenza/exec/sequenza-utils.py bam2seqz + -n normal.bam + -t tumour.bam + -gc $gc_file + -F reference.fa + + #if $interval + -C \$int + #end if + + --hom $geno.hom + --het $geno.het + -q $qual.qlimit + -f $qual.qformat + -N $qual.depth + + | \$EXEC \$SEQUENZA_INSTALL_DIR/sequenza/exec/sequenza-utils.py seqz-binning + -s - + -w $window + + | awk '{ if (\$4 >= $min_depth && \$5 >= $min_depth) print \$_ }' + + #if $gzip.gzip_selector == "yes": + #if $order_file and $interval: + | tail -n+\$skip | gzip >> $output_gzip; + #else + | gzip >> $output_gzip; + #end if + + #if $interval: + echo \$(( \$( wc -c < $output_gzip ) + 1 )) >> $bytes; + #end if + + #else: + >> $output; + #end if + + #if $interval + done; + #end if + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + +
+
+ + + gzip['gzip_selector'] == "no" + + + gzip['gzip_selector'] == "yes" + + + gzip['gzip_selector'] == "yes" + + +
diff -r 000000000000 -r 73338a1805e7 sequenza_pipeline.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sequenza_pipeline.R Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,37 @@ +#!/usr/bin/R + +# Script to Run Sequenza Pipeline in Galaxy +library(sequenza); + +# INPUT FILE +args=(commandArgs(TRUE)); +input.file <- args[1]; + +ploidy <- args[4]; + +cellularity <-args[5]; + +# STEP ONE +extract.data <- sequenza.extract( +file=input.file, +gz=TRUE +); + +# STEP TWO +fit.data <- sequenza.fit( +extract.data +); + +# STEP THREE +if(length(args)>3){ + +results.data <- sequenza.results(extract.data, cellularity=cellularity, ploidy=ploidy,out.dir = args[3],sample.id = args[2]); + +} else{ + results.data <- sequenza.results( +extract.data, + fit.data, +out.dir = args[3], + sample.id = args[2] +); +} diff -r 000000000000 -r 73338a1805e7 sequenza_pipeline.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sequenza_pipeline.xml Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,60 @@ + + + using general R sequenza pipeline + + + sequenza + SEQUENZA_INSTALL_DIR + + + +Rscript $__tool_directory__/sequenza_pipeline.R $input + + #if $sampleid_source.sampleid_selector == "bamfile": + \$(basename $sampleid_source.id | sed 's/.bam$//g' ) + #else: + $sampleid_source.id + #end if + + output + + #if $choose_fit_option.fit_option == "manual": + + $ploidy $cellularity + + #end if + + 2>&1 ; + + cat ./output/*segments.txt > $output; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 73338a1805e7 tool-data/fasta_indexes.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/fasta_indexes.loc.sample Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,29 @@ +#This is a sample file distributed with Galaxy that enables tools +#to use a directory of Samtools indexed sequences data files. You will need +#to create these data files and then create a fasta_indexes.loc file +#similar to this one (store it in this directory) that points to +#the directories in which those files are stored. The fasta_indexes.loc +#file has this format (white space characters are TAB characters): +# +# +# +#So, for example, if you had hg19 Canonical indexed stored in +# +# /depot/data2/galaxy/hg19/sam/, +# +#then the fasta_indexes.loc entry would look like this: +# +#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /depot/data2/galaxy/hg19/sam/hg19canon.fa +# +#and your /depot/data2/galaxy/hg19/sam/ directory +#would contain hg19canon.fa and hg19canon.fa.fai files. +# +#Your fasta_indexes.loc file should include an entry per line for +#each index set you have stored. The file in the path does actually +#exist, but it should never be directly used. Instead, the name serves +#as a prefix for the index file. For example: +# +#hg18canon hg18 Human (Homo sapiens): hg18 Canonical /depot/data2/galaxy/hg18/sam/hg18canon.fa +#hg18full hg18 Human (Homo sapiens): hg18 Full /depot/data2/galaxy/hg18/sam/hg18full.fa +#hg19canon hg19 Human (Homo sapiens): hg19 Canonical /depot/data2/galaxy/hg19/sam/hg19canon.fa +#hg19full hg19 Human (Homo sapiens): hg19 Full /depot/data2/galaxy/hg19/sam/hg19full.fa diff -r 000000000000 -r 73338a1805e7 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,7 @@ + + + + value, dbkey, name, path + +
+
diff -r 000000000000 -r 73338a1805e7 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Tue Oct 11 14:31:59 2016 -0400 @@ -0,0 +1,6 @@ + + + + + +