Skip to content
Snippets Groups Projects
Commit 0def7b72 authored by BIOPZ-Iborra de Toledo Paula's avatar BIOPZ-Iborra de Toledo Paula Committed by BIOPZ-Gypas Foivos
Browse files

Extract transcript sequences from genome (fasta file) and gene annotations (gtf file). Fixes #62

parent 88e3914b
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,7 @@ rule finish:
salmon_merge_on=["tpm", "numreads"])
rule create_index_star:
"""
Create index for STAR alignments
......@@ -169,17 +170,50 @@ rule create_index_star:
--sjdbGTFfile {input.gtf}) \
1> {log.stdout} 2> {log.stderr}"
rule extract_transcriptome:
""" Create transcriptome from genome and gene annotations """
input:
genome = lambda wildcards:
samples_table['genome'][
samples_table['organism'] == wildcards.organism
][0],
gtf = lambda wildcards:
samples_table['gtf'][
samples_table['organism'] == wildcards.organism
][0]
output:
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa",
)
log:
stderr = os.path.join(
config['log_dir'],
"{organism}_extract_transcriptome.log"),
stdout = os.path.join(
config['log_dir'],
"{organism}_extract_transcriptome.log")
singularity:
"docker://zavolab/cufflinks:2.2.1"
shell:
"(gffread \
-w {output.transcriptome} \
-g {input.genome} {input.gtf}) \
1> {log.stdout} 2> {log.stderr}"
rule create_index_salmon:
"""
Create index for Salmon quantification
"""
input:
transcriptome = lambda wildcards:
samples_table['tr_fasta_filtered']
[samples_table['organism'] == wildcards.organism]
[0]
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa",
)
output:
index = directory(
os.path.join(
......@@ -218,11 +252,12 @@ rule create_index_kallisto:
Create index for Kallisto quantification
"""
input:
transcriptome = lambda wildcards:
samples_table['tr_fasta_filtered']
[samples_table['organism'] == wildcards.organism]
[0]
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa",
)
output:
index = os.path.join(
config['kallisto_indexes'],
......
This diff is collapsed.
This diff is collapsed.
......@@ -78,3 +78,4 @@ results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_qu
results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/observed_bias
results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/observed_bias_3p
results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/unmapped_names.txt
results/transcriptome/homo_sapiens/transcriptome.fa
......@@ -78,3 +78,4 @@ e72f5d798c99272f8c0166dc77247db1 results/single_end/synthetic_10_reads_mate_1_s
92bcd0592d22a6a58d0360fc76103e56 results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/observed_bias
92bcd0592d22a6a58d0360fc76103e56 results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/observed_bias_3p
d41d8cd98f00b204e9800998ecf8427e results/single_end/synthetic_10_reads_mate_1_synthetic_10_reads_mate_1/salmon_quant/aux_info/unmapped_names.txt
79fc3e46b3ac1a72b80cb7bebf6058cd results/transcriptome/homo_sapiens/transcriptome.fa
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment