[Biopython-dev] 7/3 newest questions tagged biopython - Stack Overflow

Feed My Inbox updates at feedmyinbox.com
Sun Jul 3 19:14:46 EDT 2011


// Display line starting with word in a file Python regex
// July 2, 2011 at 6:41 AM

http://stackoverflow.com/questions/6556514/display-line-starting-with-word-in-a-file-python-regex
I have a file "abc.txt" with the following contents..

EMBOSS_001       601 FEDSESRRDSLFVPHRPGERRNSNGTTTETEVRKRRLSSYQISMEMLEDS    650
                          :...::.||...||....|..|.|....    |..:.|.|.|..:
EMBOSS_002         1 -----NPSLTVTVPIAVGESDFENLNTEEFSSE----SELEESKEKLNAT     41

EMBOSS_001       651 SGRQRS-MSIASILTNTMEELE-ESRQKCPPCW-------YRFANVFLIW    691
                     |..:.| :.:|........|:| |...|...|:       :.|..|....
EMBOSS_002        42 SSSEGSTVDVAPPREGEQAEIEPEEDLKPEACFTEGCIKKFPFCQVSTEE     91


I want to create three strings.. 
the first string "a" should have all characters thats written after EMBOSS_001 (of both the lines) ie

A="FEDSESRRDSLFVPHRPGERRNSNGTTTETEVRKRRLSSYQISMEMLEDSSGRQRS-MSIASILTNTMEELE-ESRQKCPPCW-------YRFANVFLIW"


Second string should have everything written after EMBOSS_002 (of both the lines) minus numbers ie 

B="-----NPSLTVTVPIAVGESDFENLNTEEFSSE----SELEESKEKLNATSSSEGSTVDVAPPREGEQAEIEPEEDLKPEACFTEGCIKKFPFCQVSTEE"


and the third string C should be whatever is between EMBOSS_1 and EMBOSS_2 (alphanumeric characters or -) in both the lines 

C="     :...::.||...||....|..|.|....    |..:.|.|.|..|..:.| :.:|........|:| |...|...|:       :.|..|...."


The original spaces at start, end(if any) and at the middle of C should be intact. In this case 5 spaces are at the start since C starts from "F" of A and "-" of B

Thanks


// Display line starting with word in a file Python regex [closed]
// July 2, 2011 at 6:41 AM

http://stackoverflow.com/questions/6556514/display-line-starting-with-word-in-a-file-python-regex
I have a file "abc.txt" with the following contents..

EMBOSS_001       601 FEDSESRRDSLFVPHRPGERRNSNGTTTETEVRKRRLSSYQISMEMLEDS    650
                          :...::.||...||....|..|.|....    |..:.|.|.|..:
EMBOSS_002         1 -----NPSLTVTVPIAVGESDFENLNTEEFSSE----SELEESKEKLNAT     41

EMBOSS_001       651 SGRQRS-MSIASILTNTMEELE-ESRQKCPPCW-------YRFANVFLIW    691
                     |..:.| :.:|........|:| |...|...|:       :.|..|....
EMBOSS_002        42 SSSEGSTVDVAPPREGEQAEIEPEEDLKPEACFTEGCIKKFPFCQVSTEE     91


I want to create three strings.. 
the first string "a" should have all characters thats written after EMBOSS_001 (of both the lines) ie

A="FEDSESRRDSLFVPHRPGERRNSNGTTTETEVRKRRLSSYQISMEMLEDSSGRQRS-MSIASILTNTMEELE-ESRQKCPPCW-------YRFANVFLIW"


Second string should have everything written after EMBOSS_002 (of both the lines) minus numbers ie 

B="-----NPSLTVTVPIAVGESDFENLNTEEFSSE----SELEESKEKLNATSSSEGSTVDVAPPREGEQAEIEPEEDLKPEACFTEGCIKKFPFCQVSTEE"


and the third string C should be whatever is between EMBOSS_1 and EMBOSS_2 (alphanumeric characters or -) in both the lines 

C="     :...::.||...||....|..|.|....    |..:.|.|.|..|..:.| :.:|........|:| |...|...|:       :.|..|...."


The original spaces at start, end(if any) and at the middle of C should be intact. In this case 5 spaces are at the start since C starts from "F" of A and "-" of B

Thanks


--
Website: http://stackoverflow.com/questions/tagged/?tagnames=biopython&sort=newest

Account Login: 
https://www.feedmyinbox.com/members/login/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

Unsubscribe here: 
http://www.feedmyinbox.com/feeds/unsubscribe/782465/c6ce4e74edf1048798e4b627c86b1b0b51013840/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

--
This email was carefully delivered by FeedMyInbox.com. 
PO Box 682532 Franklin, TN 37068



More information about the Biopython-dev mailing list