Update app.py
Browse files
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="
|
| 51 |
time.sleep(0.1)
|
| 52 |
pysam.index('ATAC/'+fid + '.bam')
|
| 53 |
-
progress(0.6, desc="
|
| 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="
|
| 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')
|