Hello,
I am trying to do bowtie2 alignment for 100 fastq files. To run bowtie2 alignment I am trying to write a python script but I am stuck at writing ''for loop''. Please help me.
Thank you
A simple bash script would probably serve you better, or a Makefile. Alternatively a workflow manager such as Snakemake which is python-ish. Please show what you tried.
Hello, Everytime I run my script it shows "bad file descriptor" in terminal. Following is my script. Please help ```py import os import subprocess import …
Greetings of the day Biostars, Recently, I am stuck with this error : Segmentation fault (core dumped) (ERR): bowtie2-align exited with value 139. I've checked …
I need help to write a `for` loop to run Trimmomatic tool for quality trimming of paired end fastq files. **Input**: file01_R1.fastq, file01_R2.fastq. The first …
A simple bash script would probably serve you better, or a Makefile. Alternatively a workflow manager such as Snakemake which is python-ish. Please show what you tried.
import subprocess folder = "/Desktop/RNA-Seq" fastq_file = [] try: for files in folder: if files.endswith('fastq'): fastq_files.append(files) subprocess.run("bowtie2 -x folder/bt2_idx -1 f1.q -2 f2.q -S f.sam") except: print('some error')
What is error you're getting here? What are the
f1.qandf2.q. Also, please format your code blocks.f1.q and f2.q is fastq file. Actually I am not able to write the script which can take pairs of files as input for bowtie2
Here is a snippet that can help you do that:
https://stackoverflow.com/questions/312443/how-do-i-split-a-list-into-equally-sized-chunks
However, you should listen to other's advices here and look into shell or workflow managers.
using bash for multiple files: bowtie2; using for multiple fastq files, linux loop code