changeset 3:eeb3cb264cb0 draft

"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/blob/master/tools/artic_margin_cons_medaka commit c866a76470b72bf5abdc2a88e6bf584c2f2f9b02-dirty"
author dfornika
date Wed, 11 Mar 2020 02:28:02 +0000
parents 24c5caa214e7
children eb4af87a77ff
files margin_cons_medaka.py
diffstat 1 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/margin_cons_medaka.py	Wed Mar 11 02:14:45 2020 +0000
+++ b/margin_cons_medaka.py	Wed Mar 11 02:28:02 2020 +0000
@@ -20,31 +20,31 @@
 def read_bed_file(fn):
     bedfile = []
     with open(fn) as csvfile:
-	reader = csv.reader(csvfile, dialect='excel-tab')
-	for row in reader:
-	    bedrow = {}
-	    bedrow['Primer_ID'] = row[3]
+        reader = csv.reader(csvfile, dialect='excel-tab')
+        for row in reader:
+            bedrow = {}
+            bedrow['Primer_ID'] = row[3]
 
-	    if len(row) >= 6:
-		# new style bed
-		bedrow['direction'] = row[5]
-	    elif len(row) == 5:
-		# old style without directory
-		if 'LEFT' in row[3]:
-		    bedrow['direction'] = '+'
-		elif 'RIGHT' in row[3]:
-		    bedrow['direction'] = '-'
-		else:
-		    print("Malformed BED file!", file=sys.stderr) 
-		    raise SystemExit
+            if len(row) >= 6:
+                # new style bed
+                bedrow['direction'] = row[5]
+            elif len(row) == 5:
+                # old style without directory
+                if 'LEFT' in row[3]:
+                    bedrow['direction'] = '+'
+                elif 'RIGHT' in row[3]:
+                    bedrow['direction'] = '-'
+                else:
+                    print("Malformed BED file!", file=sys.stderr) 
+                    raise SystemExit
 
-	    if bedrow['direction'] == '+':
-		bedrow['end'] = int(row[2])
-		bedrow['start'] = int(row[1])
-	    else:
-		bedrow['end'] = int(row[1])
-		bedrow['start'] = int(row[2])
-	    bedfile.append(bedrow)
+            if bedrow['direction'] == '+':
+                bedrow['end'] = int(row[2])
+                bedrow['start'] = int(row[1])
+            else:
+                bedrow['end'] = int(row[1])
+                bedrow['start'] = int(row[2])
+            bedfile.append(bedrow)
     return bedfile