Python Forum
basic question???????? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: basic question???????? (/thread-15452.html)



basic question???????? - cemdede - Jan-17-2019

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.


%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



RE: basic question???????? - metulburr - Jan-18-2019

what does not work?
https://python-forum.io/misc.php?action=help&hid=19


RE: basic question???????? - ntd9395 - Jan-18-2019

(Jan-18-2019, 12:05 AM)metulburr Wrote: what does not work?
https://python-forum.io/misc.php?action=help&hid=19
out of range, ur index from 0 to 2