File: sortReaSam.py

package info (click to toggle)
giira 0.0.20140625-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 760 kB
  • sloc: java: 8,578; python: 258; xml: 44; sh: 33; makefile: 14
file content (24 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: utf-8 -*-
"""
Copyright (c) 2013,
Franziska Zickmann, 
ZickmannF@rki.de, Robert Koch-Institute, Berlin, Germany
Distributed under the GNU Lesser General Public License, version 3.0
"""
#!/usr/bin/env python
import os
import sys

pathOut = sys.argv[1]

syscall1 = "samtools view -b -S %sresultsRun/reassignedReads.sam > %sresultsRun/reassignedReads.bam" %(pathOut,pathOut)
print syscall1
os.system(syscall1)

syscall2 = "samtools sort -n %sresultsRun/reassignedReads.bam %sresultsRun/reassignedReads_sorted" %(pathOut,pathOut)
print syscall2
os.system(syscall2)

syscall3 = "samtools view -h -o %sresultsRun/reassignedReads_sorted.sam %sresultsRun/reassignedReads_sorted.bam" %(pathOut,pathOut)
print syscall3
os.system(syscall3)