I am trying to make a python script that reads in a text file of pair end reads and then calls BWA mem on the pairs and outputs SAM files.
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
You can ignore whomever told you that, he/she doesn't have a clue.
Python is more powerful, in that you can certainly do more with it easily, but doing something simple like stitching together a pipeline is often easier to do in a shell script (that's their intended purpose).
There are a lot of tools, learning which ones are most convenient for what situations are an important (and error ridden) part of the learning process.
Comment
-
If you have to, use subprocess package. It should work fine.
I think shell script is straightforward, and should be used, if all it does is to run a simple command. But I prefer python when the pipeline is complex.
In my case, it is a little more complicated. In one of pipelines I created in python, I need to submit jobs to clusters. It is so much easier to read run configuration file, parse out sample name, create proper path, make meaningful job name in python (try it in bash script, you will know why I prefer python). However the submitted command errored out when it submitted from python, but pasted the print-out commands in terminal worked fine without any problem. I did not have time to find out a solution, so I let the python script generate a full set of shell commands with all the path, parameters, job dependencies, etc, nicely made, output to a xxxx.sh file, and run the shell script afterward. I probably did it backward, and need to do one extra step, but it did work well. I COULD have done all of it in shell script but then I am not so good at shell script, especially when it comes to text manipulation.
Comment
Latest Articles
Collapse
-
by seqadmin
The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...-
Channel: Articles
05-06-2024, 07:48 AM -
-
by seqadmin
The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...-
Channel: Articles
04-22-2024, 07:01 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Today, 07:03 AM
|
0 responses
10 views
0 likes
|
Last Post
by seqadmin
Today, 07:03 AM
|
||
Started by seqadmin, 05-10-2024, 06:35 AM
|
0 responses
31 views
0 likes
|
Last Post
by seqadmin
05-10-2024, 06:35 AM
|
||
Started by seqadmin, 05-09-2024, 02:46 PM
|
0 responses
41 views
0 likes
|
Last Post
by seqadmin
05-09-2024, 02:46 PM
|
||
Started by seqadmin, 05-07-2024, 06:57 AM
|
0 responses
33 views
0 likes
|
Last Post
by seqadmin
05-07-2024, 06:57 AM
|
Comment