Hi everyone, I just could not figure out why this one does not work under jupyter notebook.
I tried to take the *.sam files, use the tool on the files and put the output bam file into bam folder.
I tried to take the *.sam files, use the tool on the files and put the output bam file into bam folder.
%pylab inline import glob import os as os import pandas as pd import numpy as np
if not os.path.exists('./bam'): os.makedirs('./bam') filelist=glob.glob('./sam/*.sam') for i in filelist: sample=i.split('/') sample=sample[2] sample_s=sample.split('.') file_in='view -S -b ./sam/%s > \ ./bam/%s.bam' %(sample,i,sample_s[0]) ! samtools $file_in