一:篩選串聯(lián)重復(fù)基因

1.獲取NBS的CDS序列
將NBS的基因轉(zhuǎn)錄本的ID處理,一條基因只要一個(gè)CDS。
EXCEL-->排序-->去重復(fù)-->合并1,2列(=A1&"."B1)-->結(jié)果
$seqkit grep -f nbs_gene_id Arabidopsis_thaliana.TAIR10.cds.all.fa |seqkit seq -i >cds_hits
2.blast比對(duì)
$makeblastdb -in cds_hits -dbtype nucl -title cds_hits
$blastn -num_threads 24 -db cds_hits -query cds_hits -evalue 1e-20 -outfmt 7 >blastn.out
#7格式有表頭,6無(wú)表頭

對(duì)結(jié)果進(jìn)行篩選,基于第2及第3列的%identity>75并且aligment length>相比較的兩條序列(自己比自己)的75%.
$samtools faidx cds_hits
$perl shaixuan.pl -in1 cds_hits.fai -in2 blastn7.out -out shaixuan.result

但是這里面存在A比B和B比A的重復(fù)情況,需要取重復(fù)。在EXCEL中在1,2列之后加一列,用函數(shù)=IF(A1>B1,A1&B1,B1&A1),表示無(wú)論1,2列大小,輸出都是大的在前,小的在后。然后全選,以第3列刪除重復(fù)值,再刪除第3列,保存結(jié)果為repeat_gene_id。

