<p>From <a href="https://stackoverflow.com/a/61374803/7092484">this SO post</a>. You can use <a href="https://bioinf.shenwei.me/seqkit/" rel="nofollow noreferrer">seqkit</a> to remove duplicate sequences with the command below:</p>
<pre><code>seqkit rmdup -s &lt; sequences.txt &gt; out.fa
</code></pre>
<blockquote>
<p>The <code>rmdup</code> option removes duplicates, and the <code>-s</code> option calls duplicates on the basis of sequence, ignoring differences in headers.</p>
</blockquote>

CC BY-SA 4.0
2021-09-02T13:53:26.570Z
thank you @Throckmorton I will try ! Even if my question was more focus on if it exists some website (in general) that has a FASTA format file with all annotated genes, without double DNA sequences or sequences that are reverse complement etc... so that if I remove the FASTA headers, I would obtain the complete genome DNA sequence
HelpNeederStudent
CC BY-SA 4.0
2021-09-11T13:03:52.670Z
@Manuela does this species really have _nothing_ but genes in its genome? And all of its genes are unique? In other words, are you _sure_ that concatenating all genes will give you the genome? That seems very unlikely to me, but then I've spent most of my career working on eukaryotes.
terdon
CC BY-SA 4.0
2021-09-11T16:41:05.860Z
@terdon thank you for the observation ! I assumed it was so... I am not a biologist :)
HelpNeederStudent
CC BY-SA 4.0
2021-09-11T16:58:21.063Z
Ah, then @Manuela it is almost certainly the case the the genome has a lot of DNA that isn't part of any gene. I don't know archea at all, but if we take human as an example, genes are only around ~5% of the genome. If you want the genome, then look for the genome and not the genes.
terdon
CC BY-SA 4.0
2021-09-11T17:56:41.633Z
ok @terdon thank you .
HelpNeederStudent
CC BY-SA 4.0
2021-09-23T09:41:41.730Z
Sorry @terdon , but I have a doubt related to this: is it completely wrong to search a DNA sequence motif in a genome sequence  (because I could find a DNA sequence similar to my DNA sequence motif within the part that does not belong to gene and then I count it as a motif but it can not be) ?
HelpNeederStudent
CC BY-SA 4.0
2021-09-23T09:44:59.890Z
@Manuela that depends entirely on what you are looking for, what species you are working on etc. If your motif has a function that is only relevant within a coding sequence, for example if you are looking for a DNA sequence which when translated produces a protein domain, then you want to focus on coding sequences only. If you want to see how common the motif is in general, then you can look at the whole genome. But there is no simple answer, it will always depend on what question you are asking.
terdon
CC BY-SA 4.0
2021-09-23T09:46:00.783Z
ok thank you very much.
HelpNeederStudent
CC BY-SA 4.0
2021-09-02T02:15:13.223Z
2021-09-02T02:15:13.223Z
Throckmorton
<p>I am analysing Pyrococcus Furiosus DNA sequencing data by considering data published <a href="https://www.ncbi.nlm.nih.gov/nuccore/NC_003413.1" rel="nofollow noreferrer">here</a> in NCBI. When I click on &quot;Send to&quot;&gt;&quot;Gene Features&quot;&gt;&quot;FASTA format&quot; I download a file that has the sequences of genes of this organism but I realized that this file has some sequences that are doubled (that is the sequence is present twice with different identifiers)... is there a way to get a file with all genes annotated and their respective DNA sequences without double sequences and with all sequences in the 5' to 3' direction without reverse complement in a well &quot;ordered&quot; way ? In NCBI (in the link I reported before) it indicates 2,128 genes so I would like a file with all these 2,128 genes annotated and their respective DNA sequences in FASTA format. Do you know if there is an other website or an other place in NCBI in which I can search to get this kind of file?</p>
<p>EDIT: if you follow the path &quot;Send to&quot;&gt;&quot;Gene Features&quot;&gt;&quot;FASTA format&quot;, now it seems that there are just 2,128 genes so this problem is vanished in this case. Anyway, I would appreciate the answer for the future and for the reverse complement gene sequences that are still there.</p>
<p>Thank you very much.</p>

<fasta><sequence-analysis><public-databases><phylogenetics><public-dataset>
How to get a FASTA format file with the DNA sequences of all annotated genes?
# How to get a FASTA format file with the DNA sequences of all annotated genes?

(Asked by: username_0 on 2021-08-30)

I am analysing Pyrococcus Furiosus DNA sequencing data by considering data published [here](https://www.ncbi.nlm.nih.gov/nuccore/NC_003413.1) in NCBI. When I click on "Send to">"Gene Features">"FASTA format" I download a file that has the sequences of genes of this organism but I realized that this file has some sequences that are doubled (that is the sequence is present twice with different identifiers)... is there a way to get a file with all genes annotated and their respective DNA sequences without double sequences and with all sequences in the 5' to 3' direction without reverse complement in a well "ordered" way ? In NCBI (in the link I reported before) it indicates 2,128 genes so I would like a file with all these 2,128 genes annotated and their respective DNA sequences in FASTA format. Do you know if there is an other website or an other place in NCBI in which I can search to get this kind of file?

EDIT: if you follow the path "Send to">"Gene Features">"FASTA format", now it seems that there are just 2,128 genes so this problem is vanished in this case. Anyway, I would appreciate the answer for the future and for the reverse complement gene sequences that are still there.

Thank you very much.

**Tags:** fasta, sequence-analysis, public-databases, phylogenetics, public-dataset

---

## 1 answers

### Answer by username_1 on 2021-09-02. Score: 1

From this SO post. You can use seqkit to remove duplicate sequences with the command below:
seqkit rmdup -s < sequences.txt > out.fa


The rmdup option removes duplicates, and the -s option calls duplicates on the basis of sequence, ignoring differences in headers.

> **Comments:**
> **username_0**: thank you @Throckmorton I will try ! Even if my question was more focus on if it exists some website (in general) that has a FASTA format file with all annotated genes, without double DNA sequences or sequences that are reverse complement etc... so that if I remove the FASTA headers, I would obtain the complete genome DNA sequence  
> **username_2**: @Manuela does this species really have _nothing_ but genes in its genome? And all of its genes are unique? In other words, are you _sure_ that concatenating all genes will give you the genome? That seems very unlikely to me, but then I've spent most of my career working on eukaryotes.  
> **username_0**: @terdon thank you for the observation ! I assumed it was so... I am not a biologist :)  
> **username_2**: Ah, then @Manuela it is almost certainly the case the the genome has a lot of DNA that isn't part of any gene. I don't know archea at all, but if we take human as an example, genes are only around ~5% of the genome. If you want the genome, then look for the genome and not the genes.  
> **username_0**: ok @terdon thank you .  
> **username_0**: Sorry @terdon , but I have a doubt related to this: is it completely wrong to search a DNA sequence motif in a genome sequence  (because I could find a DNA sequence similar to my DNA sequence motif within the part that does not belong to gene and then I count it as a motif but it can not be) ?  
> **username_2**: @Manuela that depends entirely on what you are looking for, what species you are working on etc. If your motif has a function that is only relevant within a coding sequence, for example if you are looking for a DNA sequence which when translated produces a protein domain, then you want to focus on coding sequences only. If you want to see how common the motif is in general, then you can look at the whole genome. But there is no simple answer, it will always depend on what question you are asking.  
> **username_0**: ok thank you very much.  

---

