willros / nanomux

Demultiplex your nanopore reads
GNU General Public License v3.0
1 stars 1 forks source link

Is it possible to consider primer reads during demultiplexing? #3

Closed Jia-Xiu closed 4 months ago

Jia-Xiu commented 4 months ago

Hi William, I tested this package, and it works. Very cool. Thanks a lot! However, I have a few questions regarding my output.

  1. I noticed that barcodes are removed during the analysis. Can you please provide an option to keep the barcodes for further verification or for use the output in other platforms?
  2. I found that many reads appear in more than one sample. Consequently, the "Number of sequences with barcodes" is higher than the "Number of raw sequences" (please see details below). This could be due to the duplicity of our forward and reverse barcodes (a design flaw in our barcodes). I was wondering if it is possible to incorporate primer reads during demultiplexing to reduce the number of reoccurrence and increase the accuracy of demutiplexing. For example, could we link our barcodes and primers as a single entity [fwBC’ = fwBC + fwPrimer; rvBC’ = rvBC + rvPrimer]. In this case, I have some degenerate bases in my primers. Can degenerate bases be considered during the analysis? Or is it possible to use the primers as a trailing flank for the front barcode as in Dorado?
  3. When I submitted my job via slurm. I noticed that my dataset requires a lot of memory (the job was killed when I requested 96G memory for an input fastq.gz file of size 15Gb. Is there a way to optimize memory usage?

Thanks in advance! Xiu

willros commented 4 months ago

Hi,

Thank you for your comments!

  1. I will add the option to not remove the barcodes.

  2. It is because you have choosen to have 4 mismatches in fuzzy mode. I will put a cap at 1 or 2 I think, because otherwise this will happen. How long barcodes do you have?

  3. Nice to know! I will make the program work in batches instead for reading everything into memory at once!

I'll let you know when I am done!

Thanks! William

Jia-Xiu commented 4 months ago

Thanks for considering these options!

I will try to set a cap of 1 or 2 as you suggested and check the results. My barcodes are 24nt long.

How about incorporating barcodes with degenerate bases? For example, using Y to represent A or G, and R to represent C or T.

Thanks! Xiu

willros commented 4 months ago

I will try.

Please try it with greedy mode as well and check the results!

willros commented 4 months ago

I have now added the three points that you suggested. Thanks for the nice suggestions!

Please reinstall everything and try it out! See the new readme for usage.

Regards, William

willros commented 3 months ago

Hi @Jia-Xiu,

I did a lot of changes to the fuzzy searching algorithm now.

Mismatch of 3 works good for me now. It is quite much slower than if using 1 or 2, but it finds more barcodes and not as many duplicates as before.

Please download the newest version and try again!

Thanks, Ville

Jia-Xiu commented 3 months ago

Thank you @willros!

My job using the previous version is still running. It takes about 2 hrs to write the output of each sample (fuzzy with mismatch of 1). I will run the new version and check the results.

Cheers, Xiu

willros commented 3 months ago

Maybe kill the current job and try again with the newest version.

How many samples do you have to demux?