I am having trouble while performing an alignment with bwasw in only a few fastqs coming from Miseq paired end targeted DNA-seq data. Reads are 300 bp long.
The command used is:
bwa bwasw -t4 $REF $fastq_R1 $fastq_R2
And this is the error I get:
Failed to allocate -9223372036854775618 bytes at bwtsw2_pair.c line 122
The output bam is empty. This is happening only in a subset of the whole batch of samples, and when I go to bwtsw2_pair.c line 122, the code is
seq = malloc(l_mseq + (end - beg));
I have checked fastq read number in both R1 and R2 and they are equal and insert size is smaller than 300.
I do not understand why it is working in most of the samples but not in a few which do not seem to be different from the rest.