changeset 2:2d9dcbd68f6d draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit edb37634e419f75dd66292e712de51278746d883"
author jay
date Wed, 30 Dec 2020 03:09:35 +0000
parents dde9f94d41a8
children ea770264fac5
files PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py PDAUG_TSVtoFASTA/test-data/test1/Negative.fasta PDAUG_TSVtoFASTA/test-data/test1/Positive.fasta
diffstat 3 files changed, 8 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py	Tue Dec 29 04:24:37 2020 +0000
+++ b/PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.py	Wed Dec 30 03:09:35 2020 +0000
@@ -21,16 +21,18 @@
             l.append(line.split('\t')[1].strip('\n').strip('\r'))
         l = list(set(l))
 
+        print(l)
+
         for line in lines:
 
+            if l[1] in line.split('\t')[1].strip('\n').strip('\r'):
+                n= n+1
+                of1.write('>peptide_'+str(n)+'_'+str(l[1])+'\n')
+                of1.write(line.split('\t')[0]+'\n')
+
             if l[0] 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'):
                 m= m+1
-                of2.write('>peptide_'+str(m)+'_'+str(l[1])+'\n')
+                of2.write('>peptide_'+str(m)+'_'+str(l[0])+'\n')
                 of2.write(line.split('\t')[0]+'\n')
 
     elif Method == 'NoClassLabel':
--- a/PDAUG_TSVtoFASTA/test-data/test1/Negative.fasta	Tue Dec 29 04:24:37 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
->peptide_1
-GLFDIVKKVVGALG
->peptide_2
-KLLKLLKKKLLK
->peptide_3
-KLLLLKLLK
->peptide_4
-GLFDIVKKVVGALG
->peptide_5
-GLFDIVKKVVGALG
->peptide_6
-KLLKLLKKKLLK
->peptide_7
-KLLLLKLLK
->peptide_8
-GLFDIVKKVVGALG
->peptide_9
-GLFDIVKKVVGALG
->peptide_10
-KLLKLLKKKLLK
->peptide_11
-KLLLLKLLK
->peptide_12
-GLFDIVKKVVGALG
--- a/PDAUG_TSVtoFASTA/test-data/test1/Positive.fasta	Tue Dec 29 04:24:37 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
->peptide_1
-GLFDIVKKVVGALG
->peptide_2
-KLLKLLKKKLLK
->peptide_3
-KLLLLKLLK
->peptide_4
-GLFDIVKKVVGALG
->peptide_5
-GLFDIVKKVVGALG
->peptide_6
-KLLKLLKKKLLK
->peptide_7
-KLLLLKLLK
->peptide_8
-GLFDIVKKVVGALG
->peptide_9
-KLLKLLKKKLLK
->peptide_10
-KLLLLKLLK
->peptide_11
-GLFDIVKKVVGALG