Commit 40a0c942 authored by Eendebak, Liset's avatar Eendebak, Liset
Browse files

added 7final samples plus annotation docstring

parent efef5d64
#ftp.sra.ebi.ac.uk/vol1/run/ERR462/ERR4627(061)/201806(13.A-10R1)_R1.fastq.gz
#, "20180613.A-10R2"
SAMPLES = ["20180613.A-10R1", "20180613.A-10R2"]
"""
Author: Maureen Molemaker, studentnumber
Author: Liset Eendebak, studentnumber 1014355
script to map the fastq reads onto the reference genome
and to annotate the transcripts
Usage: snakemake -s mapping -c 1 # use 1 core
"""
SAMPLES = ["20180613.A-13R1", "20180613.A-13R2", "20180613.A-13R3",
"20180613.A-13R4","20180613.A-13R5","20180605.A-8R1", "20180605.A-8R2",
"20180605.A-8R3","20180605.A-8R4","20180605.A-8R5", "20180605.A-12R1",
"20180605.A-12R2","20180613.A-12R3","20180605.A-12R4","20180605.A-12R5",
"20180613.A-5R1","20180605.A-5R2", "20180613.A-5R3","20180605.A-5R4",
"20180605.A-5R5","20180613.A-6R1","20180605.A-6R2","20180605.A-6R3",
"20180613.A-6R4","20180605.A-6R5", "20180613.A-1R1", "20180605.A-1R2",
"20180613.A-1R3", "20180605.A-1R4", "20180605.A-1R5", "20180605.A-30R1",
"20180605.A-30R2","20180605.A-30R3", "20180605.A-30R4",
"20180605.A-30R5"]
rule all:
input:
expand("{sample}_hisat2.gtf", sample=SAMPLES)
#leaf 288 R4_2 has a different name
rule mapping:
input:
reads = "../transcriptome/{sample}_R1.fastq.gz",
index = "../Arabidopsis_thaliana/TAIR.1.ht2",
output:
"{sample}_hisat2.sam",
temp("{sample}_hisat2.sam"),
params:
index="../Arabidopsis_thaliana/TAIR",
shell:
"hisat2 -p 1 -x {params.index} -U {input.reads} -S {output}"
rule sort_sam: # works for both bowtie2 and hisat2
input:
"{sample}_hisat2.sam"
......@@ -26,8 +41,9 @@ rule sort_sam: # works for both bowtie2 and hisat2
"{sample}_hisat2.bam"
shell:
"samtools sort -o {output} {input}"
rule stringtie:
rule gene_annotation:
input:
bamfile = "{sample}_hisat2.bam",
annotation = "../Arabidopsis_thaliana/genes.gtf",
......@@ -40,3 +56,5 @@ rule stringtie:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment