![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with sorting sam files in python! | mavadhani | General | 6 | 12-08-2016 11:14 AM |
Python API for VCF files | mspivakov | Bioinformatics | 7 | 04-08-2014 04:51 AM |
What linux spreadsheet program can you open .sam files in? | KnowNothing2 | Bioinformatics | 11 | 12-11-2013 03:13 AM |
Blastn cannot open .nin files | PlutonicFriend | Bioinformatics | 1 | 07-24-2012 01:37 PM |
open *.sh files. | dror | Bioinformatics | 1 | 11-14-2010 04:45 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: HD Join Date: Mar 2019
Posts: 12
|
![]()
Hi!
I extracted mapped and unmapped reads of different BAM files using a bash script. Now, I want to compare which reads are in which BAM files in python. I imagined to use python sets (union, intersection) to do that. Unfortunately, I have only little python experience. I already could write a script that does the job, but without using loops etc for automation. I tried this: import glob path = "/path/to/files/*.txt" list_of_files=glob.glob(path) Now, I want to read in all lines of the files using readlines(), and store the output in separate variables to create sets using the .update() function. Do you have an idea how to do that? Greetings |
![]() |
![]() |
![]() |
#2 |
Junior Member
Location: Brazil Join Date: Sep 2017
Posts: 5
|
![]()
Why you are using Python?
You can look for Biopython module. There is a function to import your seq and alignment. The same can be made (with more options) in linux terminal w/ STAR algorithm. |
![]() |
![]() |
![]() |
Tags |
file handling, python |
Thread Tools | |
|
|