I have obtained low map reading quality (properly paired ~23%), and I
would like to know what can be done to raise the mapping quality.
Strictly speaking, I would not call this mapping quality, but mapping rate and pairing rate. Mapping quality refers to the alignments of the reads that do map.
Typically, for metagenomes, this is a problem of the assembly, not the reads or the aligner. What kind of N50/L50 do you have? What's the average read depth? How diverse is the community, and how much did you sequence? What's your insert size distribution?
If you assembled a big community from insufficient data and your contigs are typically shorter than your insert size, then most reads can't possibly map as proper pairs.
I am not sure what caused the low mapping quality, do I need to
concatenate files first then use trimmomatic?
There's not enough detail to know what you're asking, but I'm pretty sure the answer is no.
As this might have caused forward and reverse file losing reads at
different position (eg. Forward losing bases at position 1000, but
reverse reads losing bases at position 9000).
Can you rephrase this? I'm not sure what you mean. Do you mean reads are trimmed differently? That's typically expected, but without your Trimmomatic command, it's hard to evaluate.
Things are probably working as expected, but that answer could be clarified with more information.
I am not sure how trimmomatic works but for IDBA-UD usually fastq reads are combined into a fasta file. IDBA-UD expects that the reads are in the same order in both files prior to combining them in a fasta file. Did you check that reads are in the same order in both fastq files before combining them into a fasta file for IDBA-UD input? If you miss this step, IDBA-UD would not generate good quality assemblies.
Thank you Sej, I have checked my scripts and I have checked that the reads are in the same order.
I have concatenated the samples as below
cat S1_F.fastq S2_F.fastq S3_F.fastq S4_F.fastq
Then for reverse reads
cat S1_R.fastq S2_R.fastq S3_R.fastq S4_R.fastq
That looks fine to me, for the concatenation step, at least.
You are sending that cat'ed results to a new file, correct?
cat S1_F.fastq S2_F.fastq S3_F.fastq S4_F.fastq > total_F.fastqI tend to use fq2fa utility provided in the idba_ud suite with --merge option as recommended step to get fasta from paired fastq in two separate file. I am not sure if cat formats the fasta in the same way as fq2fa does, it's worth checking that though.
In the example above
catis only concatenating the files together. It isnotchanging the format from fastq --> fasta.That's correct and also
catwould not format the sequences in the expected input format for IDBA_UD assemblyfq2fa --mergewould generate output fasta file where reads from file_1.fq and file_2.fq are orderedIn metagenomics, you should check your assembly before going into alignment.