drjieliu commited on
Commit
5ff291c
·
1 Parent(s): 522c3e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -47,15 +47,15 @@ def process(bam_file,progress=gr.Progress()):
47
  progress(0.2, desc="Downloading BAM file "+bam_file)
48
  gdown.download(url=bam_file,fuzzy=True, output='ATAC/'+fid + '.bam')
49
 
50
- progress(0.4, desc="Index BAM file")
51
  time.sleep(0.1)
52
  pysam.index('ATAC/'+fid + '.bam')
53
- progress(0.6, desc="Convert BAM file to bigWig file")
54
  time.sleep(0.1)
55
  os.system('bamCoverage --bam %s -o %s --outFileFormat bigwig --normalizeUsing RPGC '
56
  '--effectiveGenomeSize 2913022398 --Offset 1 --binSize 1 --numberOfProcessors 6 '
57
  '--blackListFileName data/black_list.bed' % ('ATAC/'+fid + '.bam','ATAC/'+ fid + '.bigWig'))
58
- progress(0.8, desc="Process bigWig file")
59
  time.sleep(0.1)
60
  atac_bwtonpz('ATAC/'+fid + '.bigWig')
61
  os.remove('ATAC/'+fid+'.bam.bai')
 
47
  progress(0.2, desc="Downloading BAM file "+bam_file)
48
  gdown.download(url=bam_file,fuzzy=True, output='ATAC/'+fid + '.bam')
49
 
50
+ progress(0.4, desc="Indexing BAM file")
51
  time.sleep(0.1)
52
  pysam.index('ATAC/'+fid + '.bam')
53
+ progress(0.6, desc="Converting BAM file to BigWig file (Please note that processing time may be lengthy)")
54
  time.sleep(0.1)
55
  os.system('bamCoverage --bam %s -o %s --outFileFormat bigwig --normalizeUsing RPGC '
56
  '--effectiveGenomeSize 2913022398 --Offset 1 --binSize 1 --numberOfProcessors 6 '
57
  '--blackListFileName data/black_list.bed' % ('ATAC/'+fid + '.bam','ATAC/'+ fid + '.bigWig'))
58
+ progress(0.8, desc="Processing bigWig file")
59
  time.sleep(0.1)
60
  atac_bwtonpz('ATAC/'+fid + '.bigWig')
61
  os.remove('ATAC/'+fid+'.bam.bai')