Skip to content

Commit

Permalink
Merge pull request #81 from annahoge/patch-1
Browse files Browse the repository at this point in the history
Patch 1
  • Loading branch information
gavinha authored Nov 7, 2019
2 parents b8cd44d + 3c0fcb4 commit 97413f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions scripts/snakemake/TitanCNA.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ rule copyOptSolution:
curDir=`pwd`
for i in `cut -f11 {input} | grep -v "path"`;
do
echo -e "Creating sym links for $curDir/${{i}} to {output}"
ln -s ${{curDir}}/${{i}}* {output}
echo -e "Copying $curDir/${{i}} to {output}"
cp ${{curDir}}/${{i}}* {output}
done
"""



1 change: 1 addition & 0 deletions scripts/snakemake/config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## path to tools
samTools: /path/to/samtools
bcfTools: /path/to/bcftools

## path to scripts ##
readCounterScript: /path/to/readCounter
Expand Down
5 changes: 3 additions & 2 deletions scripts/snakemake/getAlleleCounts.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ rule getHETsites:
params:
refFasta=config["refFasta"],
snpDB=config["snpVCF"],
samtoolsCmd=config["samTools"]
samtoolsCmd=config["samTools"],
bcftoolsCmd=config["bcfTools"]
log:
"logs/titan/hetPosns/{tumor}/{tumor}.chr{chr}.log"
shell:
"{params.samtoolsCmd} mpileup -uv -I -f {params.refFasta} -r {wildcards.chr} -l {params.snpDB} {input} | bcftools call -v -c - | grep -e '0/1' -e '#' > {output} 2> {log}"
"{params.samtoolsCmd} mpileup -uv -I -f {params.refFasta} -r {wildcards.chr} -l {params.snpDB} {input} | {params.bcftoolsCmd} call -v -c - | grep -e '0/1' -e '#' > {output} 2> {log}"


rule getAlleleCountsByChr:
Expand Down
14 changes: 8 additions & 6 deletions scripts/snakemake/ichorCNA.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ configfile: "config/config.yaml"
configfile: "config/samples.yaml"

rule correctDepth:
input:
expand("results/ichorCNA/{tumor}/{tumor}.cna.seg", tumor=config["pairings"]),
expand("results/ichorCNA/{tumor}/{tumor}.correctedDepth.txt", tumor=config["pairings"]),
expand("results/readDepth/{samples}.bin{binSize}.wig", samples=config["samples"], binSize=str(config["binSize"]))
input:
expand("results/ichorCNA/{tumor}/{tumor}.cna.seg", tumor=config["pairings"]),
expand("results/ichorCNA/{tumor}/{tumor}.seg.txt", tumor=config["pairings"]),
expand("results/ichorCNA/{tumor}/{tumor}.params.txt", tumor=config["pairings"]),
expand("results/ichorCNA/{tumor}/{tumor}.correctedDepth.txt", tumor=config["pairings"]),
expand("results/readDepth/{samples}.bin{binSize}.wig", samples=config["samples"], binSize=str(config["binSize"]))

rule read_counter:
input:
Expand All @@ -30,9 +32,9 @@ rule ichorCNA:
norm=lambda wildcards: "results/readDepth/" + config["pairings"][wildcards.tumor] + ".bin" + str(config["binSize"]) + ".wig"
output:
corrDepth="results/ichorCNA/{tumor}/{tumor}.correctedDepth.txt",
#param="results/ichorCNA/{tumor}/{tumor}.params.txt",
param="results/ichorCNA/{tumor}/{tumor}.params.txt",
cna="results/ichorCNA/{tumor}/{tumor}.cna.seg",
#segTxt="results/ichorCNA/{tumor}/{tumor}.seg.txt",
segTxt="results/ichorCNA/{tumor}/{tumor}.seg.txt",
#seg="results/ichorCNA/{tumor}/{tumor}.seg",
#rdata="results/ichorCNA/{tumor}/{tumor}.RData",
params:
Expand Down

0 comments on commit 97413f0

Please sign in to comment.