1樓:Xi Yang
你根本不應該用blast處理raw read,它完全沒有關於鹼基質量的考慮。Nanopore和Pacbio都是新的測序平台,使用特別的原理,你應當使用它們自家的分析程式。
2樓:健步俠阿杜
Bioimport
SearchIO
from
Bio.Blast
import
NCBIXML
result_handle
=open
("DNA_ACRTran-Alignment.xml"
)blast_record
=NCBIXML
.read
(result_handle
)for
alignment
inblast_record
.alignments
:hsp
=alignment
.hsps[0
]error=0
deletion=0
insertion=0
deletiontime=0
insertiontime=0
insert={}
inserthm={}
delete={}
deletehm={}
fori
inrange
(len
(hsp
.query
)):if
hsp.
match[i
]==" ":
error
=error+1
ifhsp
.query[i
]=="-":
deletion
=deletion+1
ifhsp
.query[i
-1]!=
"-":
#check error tupe only when we scan the first letter in the indels
deletiontime
=deletiontime+1
j=0hm
=False
while
hsp.
query[i
+j]==
"-":j=
j+1if
(hsp
.sbjct[i
+j-1
]==hsp.
sbjct[i
+j])or
(hsp
.sbjct[i
+j]==
hsp.
sbjct[i
+j+1
]):hm
=Trueif(
hsp.
sbjct[i
-2]==
hsp.
sbjct[i
-1])or
(hsp
.sbjct[i
+j]==
hsp.
sbjct[i
+j+1
]):hm
=True
ifnot
(delete
.has_key(j
)):delete[j
]=0delete[j
]=delete[j
]+1if
(hm):if
not(
deletehm
.has_key(j
)):deletehm[j
]=0deletehm[j
]=deletehm[j
]+1elif
hsp.
sbjct[i
]=="-":
insertion
=insertion+1
ifhsp
.sbjct[i
-1]!=
"-":
insertiontime
=insertiontime+1
j=0while
hsp.
sbjct[i
+j]==
"-":j=
j+1if
not(
insert
.has_key(j
)):insert[j
]=0insert[j
]=insert[j
]+1if
(hsp
.sbjct[i
-2]==
hsp.
sbjct[i
-1])or
(hsp
.sbjct[i
-1]==
hsp.
sbjct[i
+j])or
(hsp
.sbjct[i
+j]==
hsp.
sbjct[i
+j+1
]):if
not(
inserthm
.has_key(j
)):inserthm[j
]=0inserthm[j
]=inserthm[j
]+1print
('error:'
,error
('insertion:'
,insertion
('deletion:'
,deletion
('insertiontime:'
,insertiontime
('deletiontime:'
,deletiontime
(insert
(inserthm
(delete
(deletehm)
3樓:梅菜花豬豬
既然是測序序列,那麼你肯定有sam和bam檔案,可用的程式好多。如果自己做可以考慮samtools,sam-stat;不想自己做可以考慮unigen,clc genome workbranch等商業軟體。你要的所有東西都可以用上述程式讀取bam檔案實現,至於怎麼看,google一下翻翻教程就知道怎麼輸出了。
在時間序列分析中,用ARMA模型擬合後對殘差的平方做白雜訊檢驗的目的是什麼?
The motivation is that we want to investigate the presence of ARCH effects and if there any,try to model the varying conditional variance.Stationary A...
如何對使用者進行聚類分析?
聚類是為運營服務的,當然要先確定你的業務目標有用的資料,其他維度都是為這個個服務的。比如訂單量,複購率,客單價,購物車,瀏覽類別,影響實際運營的操作是推薦品類,關聯銷售這些具體的動作。買了這個東西的使用者後續還買了什麼,就是乙個挺實用的推薦演算法,要提前算好結果,這算不算聚類分析也不必計較,聚類只是...
如何對自己進行心理分析?
於飛 心身症狀的背後是負面情緒,負面情緒的背後是對立和抗拒,抗拒的背後是不滿和怨恨,不滿的背後是情感需求。首先,症狀的背後是負面情緒。比如由擔心引發的焦慮或疑病症,由難過引發的抑鬱症,由害怕引發的恐懼症,以及焦慮 疑病和恐懼症的公升級版強迫症。也包括人際和親密關係 學習或工作 環境適應等一般的心理問...