Advertisement
Light1992

Errore Script Python

Jul 1st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. [root@localhost denovo_28June]# python
  2. Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19)
  3. [GCC 7.3.0] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import re
  6. >>> with open ('FD.fastq', 'r' ) as f:
  7. ... content = f.read()
  8. ... content_new = re.sub('(@[0-9A-Z]]*) [^\\r\\n]*', r'\1/1', content, flags = re.M)
  9. File "<stdin>", line 3
  10. content_new = re.sub('(@[0-9A-Z]]*) [^\\r\\n]*', r'\1/1', content, flags = re.M)
  11. ^
  12. SyntaxError: invalid syntax
  13. >>> f = open('output.txt', 'w')
  14. >>> f.write(content_new)
  15. Traceback (most recent call last):
  16. File "<stdin>", line 1, in <module>
  17. NameError: name 'content_new' is not defined
  18. >>> f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement