-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kallisto_out | ||
pizzly_* | ||
*.kidx | ||
cache* | ||
.snakemake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# test data set | ||
|
||
Here you will find a small test data set to ensure that kallisto and pizzly are working properly. The contents are: | ||
|
||
- `transcripts.fasta.gz`: a gzip compressed transcriptome | ||
- `transcripts.gtf.gz` : a small subset of the GTF file for Ensembl version 85 corresponding to the transcripts provided | ||
- `reads_X.fastq.gz`: gzip compressed "left" and "right" reads | ||
- `Snakefile`: a sample [`snakemake`](https://bitbucket.org/johanneskoester/snakemake/wiki/Home) file (not required for running kallisto or pizzly) | ||
|
||
Running `snakemake` will go through the following pipeline | ||
|
||
1. Creates the index for use with `kallisto` | ||
2. Runs `kallisto` with `--fusion` to identify potential fusions | ||
3. Runs `pizzly` on the `kallisto` output to identify potential fusions | ||
4. Creates a new index based on the transcriptome and the fusion transcripts identified by `pizzly` | ||
5. Runs `kallisto` in normal quantification mode on the expanded index to quantify both normal transcripts and fusions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import os | ||
|
||
PRE = "transcripts" | ||
FASTA = "{0}.fasta.gz".format(PRE) | ||
GTF = "{0}.gtf.gz".format(PRE) | ||
INDEX = "{0}.kidx".format(PRE) | ||
K = 31 | ||
|
||
|
||
ZCAT = 'gzcat' if os.uname()[0] == 'Darwin' else 'zcat' | ||
|
||
rule all: | ||
input: | ||
"kallisto_out/abundance.h5", | ||
"pizzly_out/output.json", | ||
"pizzly_post/abundance.h5" | ||
|
||
rule index: | ||
input: FASTA | ||
output: INDEX | ||
shell: | ||
"kallisto index -k {K} -i {output} {input}" | ||
|
||
rule kallisto_quant: | ||
input: | ||
"reads_1.fastq.gz", | ||
"reads_2.fastq.gz", | ||
INDEX | ||
output: | ||
"kallisto_out", | ||
"kallisto_out/abundance.h5", | ||
"kallisto_out/abundance.tsv", | ||
"kallisto_out/run_info.json", | ||
"kallisto_out/fusion.txt" | ||
shell: | ||
"kallisto quant " | ||
"-i {INDEX} " | ||
"-o {output[0]} " | ||
"--fusion " | ||
"{input[0]} {input[1]}" | ||
|
||
rule pizzly: | ||
input: | ||
FASTA, | ||
"kallisto_out/fusion.txt" | ||
output: | ||
"pizzly_out/output.json", | ||
"pizzly_out/output.fusions.fasta" | ||
shell: | ||
"../build/pizzly " | ||
"-k {K} " | ||
"--gtf {GTF} " | ||
"--cache cache.txt " | ||
"--align-score 2 " | ||
"--insert-size 400 " | ||
"--fasta {FASTA} " | ||
"--output pizzly_out/output " | ||
"kallisto_out/fusion.txt " | ||
|
||
rule append_index: | ||
input: | ||
FASTA, | ||
"pizzly_out/output.fusions.fasta" | ||
output: | ||
"pizzly_post/transcripts_with_fusions.fasta.gz", | ||
"pizzly_post/transcripts_with_fusions.kidx" | ||
shell: | ||
"cat <({ZCAT} {FASTA}) {input[1]} | gzip - > {output[0]} && " | ||
"kallisto index -k {K} -i {output[1]} {output[0]}" | ||
|
||
rule requant_kallisto: | ||
input: | ||
"reads_1.fastq.gz", | ||
"reads_2.fastq.gz", | ||
"pizzly_post/transcripts_with_fusions.kidx" | ||
output: | ||
"pizzly_post", | ||
"pizzly_post/abundance.h5" | ||
shell: | ||
"kallisto quant " | ||
"-i {input[2]} " | ||
"-o {output[0]} " | ||
"{input[0]} {input[1]}" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.