I’m also having this issue. I downloaded SRA files from a bioproject and this thread made me realise the sequence headers were abnormal:
@ERR5383527.1 1 length=150
AGCAAGGAAAGAAGGAAGAAAAGAAAGAAAGAAGGAAGGAAAGAGAAGAAACATCTTTTAAAAAGCAGTGGGACTAATTTTTCCTGTGAGATGTTGGAGAAGAGTGTGGGATTGGATCCAGTGGACTCTGGCTCTGGTCCTGGCTTTGCC
+ERR5383527.1 1 length=150
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,FFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
and the paired read has identical headers:
@ERR5383527.1 1 length=150
NGAGGATCTCAGGCTCAGCAATGTCACATGACTGGATCACACACTTAGTAAATGGCAAAGCCAGGACCAGAGCCAGAGTCCACTGGATCCAATCCCACACTCTTCTCCAACATCTCACAGGAAAAATTAGTCCCACTGCTTTTTAAAAGA
+ERR5383527.1 1 length=150
#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFF:FFFFFFFFFFFFFFFFF:,,FFFFFFF
From this comment I understand that the original headers are stripped in SRA databases. Does anyone have a recommendation on how to reformat them so Kneaddata can work with them without flagging them all as unmatched? Could I simply reformat to @ERR5383527.1.1 and @ERR5383527.1.2, for example?
EDIT: it works. From what I gather, just make sure your identifiers are identical and finish with 1 and 2, respectively. The command that worked for me, if it can help anyone, was
# fix SRA files with incomplete header info
for file in raw_data_SRA/*1.fastq;
do name=$(basename $file)
sed 's/\ .*/.1/g' $file | sed 's/+.*/+/g' > raw_data/$name
done
and do the same by replacing the two 1s with 2s
Notice that in my case I also removed the duplicate identifiers following the + sign