# HG changeset patch
# User yating-l
# Date 1482176977 18000
# Node ID cf258ca024ffaa334cf838cc982b8c0876bbdcf0
# Parent e9dcea52d07979be677c36253b46ffa2e8eaf2e7
planemo upload commit ca69686dfafcabb815c93fd46d3c4dfe57459e39-dirty
diff -r e9dcea52d079 -r cf258ca024ff README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md Mon Dec 19 14:49:37 2016 -0500
@@ -0,0 +1,6 @@
+# regtools
+A Galaxy Wrapper for regtools
+
+This is a modified Galaxy wrapper for regtools which is based on the previous wrapper written by Remi Marenco (https://github.com/remimarenco/regtools). "regtools is a set of tools that integrate DNA-seq and RNA-seq data to help interpret mutations in a regulatory and splicing context" (https://regtools.readthedocs.io/en/latest/).
+
+This wrapper add an validation step to check if the output files are valid BED format. The lines with invalid strand (neighter "+" or "-") will be removed. The scores higher than 1000 will be changed to 1000. All modified lines will be reported to the standard output.
diff -r e9dcea52d079 -r cf258ca024ff regtools_junctions_extract.xml
--- a/regtools_junctions_extract.xml Mon Dec 19 13:21:56 2016 -0500
+++ b/regtools_junctions_extract.xml Mon Dec 19 14:49:37 2016 -0500
@@ -100,7 +100,7 @@
-
+
1000):
+ scoreLines.append("line" + str(i) + ":" + line)
+ fields[4] = '1000'
if (strand == '+' or strand == '-'):
tmp.write('\t'.join(map(str, fields)))
tmp.write("\n")
@@ -25,15 +27,18 @@
removedLines.append("line" + str(i) + ": " + line)
i = i+1
- return removedLines
+ return removedLines, scoreLines
def main():
inputfile = str(sys.argv[1])
outputfile = str(sys.argv[2])
- removed = checkAndFixBed(inputfile, outputfile)
+ removed, changed = checkAndFixBed(inputfile, outputfile)
if (removed != []):
print "\nRemoved invalid lines: \n"
print "\n".join(removed)
+ if (changed != []):
+ print "\nThe following lines have scores > 1000, so they are changed to 1000:\n"
+ print "\n".join(changed)
if __name__ == "__main__":
main()