I read python basic codes and I am fimiliar with for loops, But not able to understand how to make a python programme to run hisat2 on multiple pair-end reads.
I want to run hisat2 mapping tool on mutiple pair end reads to map these on Genome.
I already have prepared genome index.
1)my input will be hisat2 location and genome index, pair-end read file 2) How should I give multiple hisat2 arguments and how to store sam file in a separate folder for each pair-end reads.
Can you help to make this python script ?
Location of hisat2:
/home/yog/software/hisat2-2.0.4/hisat2
Location of genome index:
data/Analysis/Radish_index
Location of pair end files:
/data/Analysis/mapped/
multiple pair end files like this:
216_5W_Ca1_R1.fq
216_5W_Ca1_R2.fq
218_5W_Ca1_R1.fq
218_5W_Ca1_R1.fq
216_5W_Co1_R1.fq
216_5W_Co1_R2.fq
218_5W_Co1_R1.fq
218_5W_Co1_R1.fq
Now I am running hisat2 on individual files by using this commonad:
/home/yog/software/hisat2-2.0.4/hisat2 -p 8 -x /data/Analysis/Radish_index --fr -1 /data/Analysis/mapped/216_5W_Ca1_R1.fq -2 /data/Analysis/mapped/216_5W_Ca1_R2.fq -S 216_5W_Ca1.sam
@Philipp Bayer Thanks, this bash script is awesome as I tried it on my data. But, my paired-end files are named in the following pattern:
I am trying to edit the script to get the following pattern in the name of sam and bam output, but did not work:
However, the editing of :
to
worked. :)
I figured out:
Ref: How to remove the extension of a file?