remove duplicated gene pairs
1
0
Entering edit mode
8.8 years ago
liuhui ▴ 20

Dear all,

I want to remove duplicated gene pair combinations from

TRINITY_DN106621_c0_g1_i1       TRINITY_DN129833_c0_g1_i2
TRINITY_DN106621_c0_g1_i1       TRINITY_DN140628_c4_g2_i2
TRINITY_DN106621_c0_g1_i1       TRINITY_DN135041_c0_g1_i1
TRINITY_DN135041_c0_g1_i1       TRINITY_DN106621_c0_g1_i1
TRINITY_DN140628_c4_g2_i2       TRINITY_DN106621_c0_g1_i1
TRINITY_DN129833_c0_g1_i2       TRINITY_DN106621_c0_g1_i1

to

TRINITY_DN106621_c0_g1_i1       TRINITY_DN129833_c0_g1_i2
TRINITY_DN106621_c0_g1_i1       TRINITY_DN140628_c4_g2_i2
TRINITY_DN106621_c0_g1_i1       TRINITY_DN135041_c0_g1_i1

Can I make it just using the linux code or perl code?

Any advice would be great.

Thank you very much.

RNA-Seq gene • 1.7k views
ADD COMMENT
0
Entering edit mode

Hello liuhui!

We believe that this post does not fit the main topic of this site.

Its not really a bioinformatics question. Google will help you.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLY
0
Entering edit mode

Hello atla,

The gene pairs data was generated from all by all blastp,and I would like use this data to analyse the ks distribution.

So, I think it is a bioinformatics question.

Thank you.

Best!

ADD REPLY
0
Entering edit mode

I am editing the format to make the question clear.

ADD REPLY
0
Entering edit mode

Hello liuhui!

It appears that your post has been cross-posted to another site: http://seqanswers.com/forums/showthread.php?t=66473

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY
3
Entering edit mode
8.8 years ago
awk '{printf("%s\t%s\n",($1<$2?$1:$2),($1<$2?$2:$1));}' input.txt | sort | uniq
ADD COMMENT

Login before adding your answer.

Traffic: 1646 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6