How to extract 2 columns and sorting them numerically in descending order (fasta)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.
I've tried:
awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1
yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?
sort
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.
I've tried:
awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1
yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?
sort
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.
I've tried:
awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1
yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?
sort
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Hi there I'm working with fasta sequences and I've created files that are in a tabular format. Of the columns contained in the file I want to extract the second (order name) and the 24th (bit score), I then want to sort the unique instances in a descending numerical order.
I've tried:
awk 'print $2,$24' LB.blasted.fasta | sort | uniq -c | sort -rn > test1
yet if I remove the $24 in the statement block I end up with the same results, both of which include things like query, Database, BLASTN, 500, and Fields: score, as listed elements. How do I filter this out? Or is there a better way to extract 2 columns and have them sorted numerically?
sort
sort
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 12 mins ago
Gurkamal Deol
1
1
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Gurkamal Deol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.
Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.
Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.
Gurkamal Deol is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474726%2fhow-to-extract-2-columns-and-sorting-them-numerically-in-descending-order-fasta%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password