Mercurial > repos > jay > pdaug_aa_property_based_peptide_generation
diff PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py @ 2:fa14a32e0d95 draft
"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit 8b18552f6d2b2261efebe1075ff4c18a295b94dd"
author | jay |
---|---|
date | Tue, 29 Dec 2020 19:26:46 +0000 |
parents | 69a1ba3d6d29 |
children | 42815cbb8c16 |
line wrap: on
line diff
--- a/PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py Tue Dec 29 04:54:02 2020 +0000 +++ b/PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py Tue Dec 29 19:26:46 2020 +0000 @@ -21,14 +21,16 @@ l.append(line.split('\t')[1].strip('\n').strip('\r')) l = list(set(l)) + print(l) + for line in lines: - if l[0] in line.split('\t')[1].strip('\n').strip('\r'): + if l[1] in line.split('\t')[1].strip('\n').strip('\r'): n= n+1 of1.write('>peptide_'+str(n)+'_'+str(l[0])+'\n') of1.write(line.split('\t')[0]+'\n') - if l[1] in line.split('\t')[1].strip('\n').strip('\r'): + if l[0] in line.split('\t')[1].strip('\n').strip('\r'): m= m+1 of2.write('>peptide_'+str(m)+'_'+str(l[1])+'\n') of2.write(line.split('\t')[0]+'\n')