



rule hisat:
    input: fq = "00fastq/{sample}.fastq.gz",
           idx = "00ref/hisat_index/R64-1-1"
    output: "02aln/{sample}.bam"
    shell:
        """
        module load hisat/2.0.5 samtools/1.4
        hisat2 -x {input.idx} -U {input.fq} --threads 4 \
          | samtools sort -T tmp/{wildcards.sample} -O BAM \
          > {output} 
        samtools index {output}
        """
