Hello Kirsi,
Just to clarify the situation:
You have 12 total pairs of .fna and .qual files. They've already been separated into these files by the original 12 samples, and the barcode has been removed (was this removal done by the sequencing company? Was this done in Lubbock, Texas by any chance?).
Because the barcode has been removed, as well as the corresponding quality scores in the .qual files, it makes any attempt to manually reappend the barcodes impossible.
One approach would be to create 12 separate mapping files, one for each sample (you also want a combined mapping file with all the samples in it for downstream analyses, just use the -b option with check_id_map to make sure the mapping file is okay).
So for HDIG4LN01D9D53, you would just have something like this:
Original file called Marine_map1.txt
#SampleID BarcodeSequence LinkerPrimerSequence ReversePrimer Description
Description
HDIG4LN01D9D53 AGAGTTTGATCMTGGCTCAG GTATTACCGCGGCTGCTG Marine_Sample1
with the BarcodeSequence field empty.
when you run check_id_map.py on each file, include the -b option.
Then you will need to run split_libraries with the -b 0 option on each file, and a different output directory for each run (-o option).
Finally, you can concatenate all of the results by using the following command:
cat path to first seqs.fna output file path to second seqs.fna output file .... path to twelfth seqs.fna output file > combined_seqs.fna
There may be an easier way, but it would depend upon there being some sort of identifier in the fasta labels that could be used to help assign the sequences to particular SampleIDs.
You can get the first 10 lines of a fasta file by typing:
head path_to_fasta > sample_seqs1.fna
If you do this for a couple of your files, we could look at the fasta labels to see if there are any useful sample-specific data in the labels that we can use to demultiplex in a single step.
Best regards,
Tony Walters