annotate sequenza_pipeline.R @ 0:73338a1805e7 draft

planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
author morinlab
date Tue, 11 Oct 2016 14:31:59 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
1 #!/usr/bin/R
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
2
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
3 # Script to Run Sequenza Pipeline in Galaxy
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
4 library(sequenza);
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
5
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
6 # INPUT FILE
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
7 args=(commandArgs(TRUE));
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
8 input.file <- args[1];
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
9
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
10 ploidy <- args[4];
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
11
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
12 cellularity <-args[5];
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
13
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
14 # STEP ONE
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
15 extract.data <- sequenza.extract(
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
16 file=input.file,
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
17 gz=TRUE
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
18 );
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
19
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
20 # STEP TWO
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
21 fit.data <- sequenza.fit(
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
22 extract.data
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
23 );
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
24
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
25 # STEP THREE
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
26 if(length(args)>3){
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
27
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
28 results.data <- sequenza.results(extract.data, cellularity=cellularity, ploidy=ploidy,out.dir = args[3],sample.id = args[2]);
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
29
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
30 } else{
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
31 results.data <- sequenza.results(
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
32 extract.data,
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
33 fit.data,
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
34 out.dir = args[3],
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
35 sample.id = args[2]
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
36 );
73338a1805e7 planemo upload for repository https://github.com/morinlab/tools-morinlab/tree/master/tools/sequenza commit 4ef2d91b7c1686a2696b92fe538d4aec51d05e40-dirty
morinlab
parents:
diff changeset
37 }