This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to count repeated sequences in fasta file?

Excuse me :

For a sequencing data, how to count repeated sequences in fasta file?

Many thanks in advance!

sequence next-gen-sequencing

Hello 897598644!

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

This question has been addressed a lot of times. Please search the forum with the terms "fasta duplicate".

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!

Addressed a lot of times? Oh really? So why am I still looking for similar question, what is more question which is answered already...

Hmmm if you can parse your fasta file into tab separated table, I mean column 1 - ID column 2 - sequence. You can count duplicated sequences in very easy way in R:

count(data, seq)
table(data$seq)

where 'seq' is name of column which contains sequences.

This commands will print sequence and it's frequency in fasta file.

I'm sure, that is some tool which can count repeats in fasta file without any convertion but I don't know any of them.

Maybe I would, but question is closed :x

Counting repeats isn't as much as popular as duplicates removal from fasta.

Best regards,
Adam

Adam,

Knowledge doesn't work that way - you don't always get _exactly_ what you're looking for. You get a sense of the direction you should be looking at. Of the many tools that exist to remove duplicates, do you think not even one would address the counting duplicates challenge? Counting duplicates is a much simpler task than removing them, albeit implemented in fewer tools (owing to obvious reasons, including the fact that a uniq -c run on a sed output can achieve what you're looking for).

I'd recommend taking a look at bioawk, and also being a little less snarky :)

Yes I understand, however your first answer to user 897598644 was as such as

"Hello

I'd like to make cheesecake for my girlfriend. She really loves it. Unfortunately I have no clue how to even start and she will come in next few hours :( " Answer:

"You should search forum with the terms "how to make cheesecake" or you should take a look in cookbook"

So what is the point of this page? In addition to this, sorry but I have bad memories related with awk and anything related to it...

Yes, you start searching forums, or on google, and add your restriction, which is time. So you search "how to make cheesecake in three hours"

Also, hate to make these arguments, but you're not owed an answer by the forum. Plus, you need to understand that neither the cheesecake urgency nor your bad experience with awk is my problem - they're yours to deal with. We give you solutions that work well, and suit the situation well. If you cannot use them owing to inexplicable reasons, we are very sorry, but we cannot always accommodate those.

0 answers

No answers yet.

Log in to answer this question.