Mercurial > repos > bgruening > deeptools
diff bamCorrelate.xml @ 1:21d563d5f2b2 draft
Uploaded
| author | bgruening |
|---|---|
| date | Mon, 05 Aug 2013 10:09:51 -0400 |
| parents | 09b65c12a75a |
| children | 1f312af2f8db |
line wrap: on
line diff
--- a/bamCorrelate.xml Sat Aug 03 13:42:12 2013 -0400 +++ b/bamCorrelate.xml Mon Aug 05 10:09:51 2013 -0400 @@ -1,20 +1,36 @@ -<tool id="bamCorrelate" name="bamCorrelate" version="1.0"> +<tool id="bamCorrelate" name="bamCorrelate" version="1.0.1"> <description>corrlates pairs of bam files</description> <requirements> - <requirement type="package" version="1.5.1_98e5d8a61431ea8605c0643d991a1a5d8999b4dc">deepTools</requirement> + <requirement type="package" version="1.5.1_59e067cce039cb93add04823c9f51cab202f8c2b">deepTools</requirement> </requirements> <command> - #set files=[] - #set labels=[] - #for $i in $inputs - #set $files += [str($i.bamfile)] - #if str($i.label.value) != "": - #set $labels += ["\"%s\"" % ($i.label.value)] - #else - #set $labels += ["\"%s\"" % ($i.bamfile.name)] - #end if - #end for + #import tempfile + #set $temp_dir = os.path.abspath(tempfile.mkdtemp()) + + #set files=[] + #set labels=[] + #for $i in $inputs + + #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir ) + #set $temp_input_path = $temp_input_handle.name + #silent $temp_input_handle.close() + #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path)) + #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path)) + #silent $files.append('%s.bam' % $temp_input_path) + + + ##set $files += [str($i.bamfile)] + #if str($i.label.value) != "": + #set $labels += ["\"%s\"" % ($i.label.value)] + #else + #set $labels += ["\"%s\"" % ($i.bamfile.name)] + #end if + #end for bamCorrelate + + ##ToDo + --numberOfProcessors 4 + --bamfiles #echo " ".join($files) --labels #echo " ".join($labels) @@ -25,12 +41,8 @@ --plotFile $newoutFileName #if $outputOpt.showOutputOpt == "yes" - #if $outputOpt.outFileRawCounts: - --outRawCounts '$outputOpt.outFileRawCounts' - #end if - #if $outputOpt.outFileCorMatrix: - --outFileCorMatrix '$outputOpt.outFileCorMatrix' - #end if + --outRawCounts '$outFileRawCounts' + --outFileCorMatrix '$outFileCorMatrix' #end if #if $advancedOpt.showAdvancedOpt == "yes": @@ -53,12 +65,11 @@ --minMappingQuality '$advancedOpt.minMappingQuality' #end if #end if - - --numberOfProcessors 4; mv $newoutFileName $outFileName + ; mv $newoutFileName $outFileName + ; rm $temp_dir -rf </command> <inputs> - <repeat name="inputs" title="Input files" min="2"> <param name="bamfile" type="data" format="bam" label="Bam file" @@ -67,7 +78,7 @@ label="Label" help="Label to use in the output. If not given the dataset name will be used instead."/> </repeat> - + <param name="fragmentLength" type="integer" value="300" min="1" label="Length of the average fragment size" help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see "normalize coverage to 1x"). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/>
