I struggled so much with my data before that I didn't think the solution could be that obvious (there was also the "R" after "Sequence" but it got added when I rerun the code to get a screenshot of what was happening)......
I would also like to ask a question about the seqkit command used before.
After using it and importing the database on qiime2, I noticed that my file size went from 115 MO to 21 MO
So lot of information from the database seem to have been lost. Is there anything in this command that I could modify ? Or is it totally normal ?
Another things, I still get this error message when trying to import the database :
database/fasta.degapped.fa is not a(n) AlignedDNAFASTAFormat file:
The sequence starting on line 6 was length 408. All previous sequences were length 659. All sequences must be the same length for AlignedDNAFASTAFormat.
The error is telling you that the FASTA file you are trying to import is no longer in the form of an alignment. That is each sequence (nucleotide bases, indels, etc..) should be the same length. Like this:
ACTGCA--ACTG--CAC
ACTGCATTACTGACCAC
Given the name of your file is fasta.degapped.fna, tells me that you removed gap and missing (-.) characters from your sequences. Which means they won't be the same length and will look like this:
ACTGCAACTGCAC
ACTGCATTACTGACCAC
Thus you can only import them as DNAFASTAFormat, not AlignedDNAFASTAFormat.
Thank you for your answers ! In the end I used another software to rename the duplicates and to align the sequences before importing them. And it worked !