13
answers
451views


未解决

现在手上有10个blastn -m 9的结果,想要把所有能比对上的query ID和subject ID提取出来以后求这10个结果的交集,但是不会写代码干着急,求助帮忙~
我要的是各自query ID和subject ID,然后求这十组数据的交集

blast -m 9 结果示例:

query id, subject id, %identity, alignment length, mismatches,gap openings

isotig1138 NODE_2836 100.00 20 0 0

isotig1139 NODE_2354 100.00 20 0 0




    1

    perl中使用BPlite模块可以提取blast中各项信息,你把那模块下载下来,仔细看看里面的说明,应该就可以了

    Current score: 0
    [Link] | [回复Ta]
    2

    不想写代码的话。
    要我说,导入excel处理还更好呢。

    Current score: 0
    [Link] | [回复Ta]
    3

    excel对行数有限制,数据太多,显示不了全部。想写代码,但是在学习中,自己还写不出来。工作又不能等,只有求助了,唉

    Current score: 0
    [Link] | [回复Ta]
    4

    @jingxy:

    那倒是。 你会linux 还是perl?

    Current score: 0
    [Link] | [回复Ta]
    5

    见笑了,今年2月份换了工作才开始接触linux,没几天,二者都属于初级阶段

    Current score: 0
    [Link] | [回复Ta]
    6

    @jingxy:
    把完整的前几行贴出来看看。。

    Current score: 0
    [Link] | [回复Ta]
    7

    # BLASTN 2.2.19 [Nov-02-2008]
    # Query: isotig11382_length_828_1_F1
    # Database: ../EST_addlength.fna
    # Fields: Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value, bit score
    isotig11382_length_828_1_F1 isotig11382_length_828 100.00 20 0 0 1 20 373 392 2e-04 37.4
    # BLASTN 2.2.19 [Nov-02-2008]
    # Query: isotig11382_length_828_1_R1
    # Database: ../EST_addlength.fna
    # Fields: Query id, Subject id, % identity, alignment length, mismatches, gap openings, q. start, q. end, s. start, s. end, e-value, bit score
    isotig11382_length_828_1_R1 isotig11382_length_828 100.00 20 0 0 1 20 812 793 2e-04 37.4

    Current score: 0
    [Link] | [回复Ta]
    8

    用linux命令处理这些简单的处理是很容易的。

    ~假设你这个文件名为m9.blast
    cat m9.blast |grep "^[^#]"|awk '{print $1,$2}'
    过滤#开头的行,只留下有用的。另外取出第一列($1),和第二列($2)。根据你的意思,只取 Query id, Subject id嘛

    ~用sort排序,用uniq -d 取出重复行,就是有交集的部分。
    cat m9.blast |grep "^[^#]"|awk '{print $1,$2}'|sort|uniq -d

    ~你有10个文件。用cat命令一步搞定. 文件名用空格隔开。下面列举3个。
    cat m9.blast_1 m9.blast_2 m9.blast_3 |grep "^[^#]"|awk '{print $1,$2}'|sort|uniq -d

    ~上面是直接显示的。如果要输出到文件。完整命令如下。
    cat m9.blast_1 m9.blast_2 m9.blast_3 |grep "^[^#]"|awk '{print $1,$2}'|sort|uniq -d >output

    这样应该是完成你的要求了。其实用-m8不是更好嘛。。

    Current score: 0
    [Link] | [回复Ta]
    9

    高手!跪谢了!

    Current score: 0
    [Link] | [回复Ta]
    10

     
    @柳城:前辈,blast的-m 1-9哪里有解释的啊???请教一下

    Current score: 0
    [Link] | [回复Ta]
    11

     

    @zhangjian995:

    你可以重新开问题提问的。

    Current score: 0
    [Link] | [回复Ta]
    12

    恩,以后会注意的,我在网上找到答案了,谢谢!!

    Current score: 0
    [Link] | [回复Ta]
    13

    学习了,谢谢

    Current score: 0
    [Link] | [回复Ta]

Your Answer

You must be logged in to post a comment.

登陆后可评论。

adobe free

adobe free

winrar 3 download

winrar 3 download freedownload

windows 7 free

windows 7 crack

key office 2010

office 2010 key

download photo shop free

photo shop serial

corel dvd moviefactory 6

corel dvd moviefactory 6 downloads

free corel photoshop download

free corel photoshop download keygen

photoshop key

photoshop key

free corel downloads

free corel downloads cracked

free winrar download for xp

download winrar for xp for free

serial corel draw 11

serial corel draw 11 serials

windows 7 key

windows 7 key

photo shop key

photo shop key

winrar password cracker serial

wirar password cracker

serial winzip 11

serial winzip 11 key

cs5 serialz

cs5 serialz free

office 2010 professional key

office 2010 key

office 2010 free

office 2010 key

windows key

windows key