## conda install -c bioconda igvtools
## conda install -c bioconda igv
## conda install -c bioconda samtools
## http://kazumaxneo.hatenablog.com/entry/2017/07/05/132019
import os
thread_num = 6
root_dir = '/Users/name/Downloads/test_igv/output'
igv_dir = os.path.join(root_dir,'igv_dir')
### sort and index using samtools
fr = open(os.path.join(root_dir,'SRR_Acc_List.txt'),'r').readlines()
for line in fr:
line = line.replace('\n','')
lst = line.split(',')
filename = lst[0]
samplename = filename
if not os.path.exists(igv_dir):
os.mkdir(igv_dir)
### sort bam
msg = '%s is now sorting...' % (samplename)
print( msg )
bamFile = os.path.join(root_dir,samplename+'.Aligned.out.bam')
bamSortFile = os.path.join(igv_dir,samplename+'.Aligned.out.sorted.bam')
cmd = 'samtools sort -@ %d -o %s %s' % (thread_num,bamSortFile,bamFile)
print( cmd )
os.system(cmd)
### index
msg = '%s is now indexing...' % (samplename)
print( msg )
cmd = 'samtools index %s' % (bamSortFile)
print( cmd )
os.system(cmd)
## finish ##
msg = '%s : finish!' % (samplename)
print( msg )
exe. : 解析対象データのsampleID
SRR1111111
SRR1111112
SRR1111113
SRR1111114
SRR1111115
SRR1111116
SRR1111117
SRR1111118
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing