File: pysam_testpp.py

package info (click to toggle)
python-pysam 0.10.0+ds-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,196 kB
  • ctags: 10,087
  • sloc: ansic: 79,627; python: 8,569; sh: 282; makefile: 215; perl: 41
file content (13 lines) | stat: -rw-r--r-- 358 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
import pp
import pysam

def sortBam(bam_filepath, out_prefix):
    pysam.sort(bam_filepath, out_prefix)

job_server = pp.Server(ncpus=2, ppservers = (), secret='secret')

job1 = job_server.submit(sortBam, ('ex1.bam', 'tmp1_'), modules=('pysam',))
job2 = job_server.submit(sortBam, ('ex2.bam', 'tmp2_'), modules=('pysam',))

result1 = job1()
result2 = job2()