Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run_diginorm_renamer(args): | |
from Bio.SeqIO.QualityIO import FastqGeneralIterator | |
infile, outfile = args | |
with open(outfile, "w") as o: | |
for i, (name, seq, qual) in enumerate(FastqGeneralIterator(open(infile))): | |
add = 1 | |
if i % 2 != 0: | |
add = 2 | |
o.write("@%s_%d\n%s\n+\n%s\n" % (name, add, seq, qual)) | |
if i % 100000 == 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manager_name = 'Manager.ipynb' | |
import os | |
from IPython.display import FileLink, FileLinks, display, HTML, display_html | |
notebooks = !find . | grep .ipynb$ | grep -v checkpoint | |
notebooks = sorted(notebooks) | |
root_dir = [os.path.dirname(os.path.abspath(x)) for x in notebooks if manager_name in x] | |
paths = [] | |
for n in notebooks: | |
u = os.path.abspath(n).replace(root_dir[0], '/notebooks') | |
display_html(HTML('<li><a href=%s target=_new>%s' % (u, u))) |
NewerOlder