/usr/share/ray/scripts/interleave-fasta.py is in ray-extra 2.3.0-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/python
# encoding:utf8
# author: Sébastien Boisvert
# part of Ray distribution
"""This script takes two fasta files and interleaves them
Usage:
interleave-fasta.py fasta_file1 fasta_file2
"""
# Importing modules
import sys
# Main
if __name__ == '__main__':
try:
file1 = sys.argv[1]
file2 = sys.argv[2]
except:
print __doc__
sys.exit(1)
with open(file1) as f1:
with open(file2) as f2:
while True:
line = f1.readline()
if line.strip() == "":
break
print line.strip()
print f1.readline().strip()
print f2.readline().strip()
print f2.readline().strip()
|