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
Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...-
Channel: Articles
04-04-2024, 04:25 PM -
-
by seqadmin
Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...-
Channel: Articles
03-22-2024, 06:39 AM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, 04-11-2024, 12:08 PM
|
0 responses
27 views
0 likes
|
Last Post
by seqadmin
04-11-2024, 12:08 PM
|
||
Started by seqadmin, 04-10-2024, 10:19 PM
|
0 responses
31 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 10:19 PM
|
||
Started by seqadmin, 04-10-2024, 09:21 AM
|
0 responses
27 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 09:21 AM
|
||
Started by seqadmin, 04-04-2024, 09:00 AM
|
0 responses
52 views
0 likes
|
Last Post
by seqadmin
04-04-2024, 09:00 AM
|
Comment