NBISweden / aMeta

Ancient microbiome snakemake workflow
MIT License
19 stars 14 forks source link

Add support for multiple adapters #90

Closed percyfal closed 2 years ago

percyfal commented 2 years ago

Fixes #76

NikolayOskolkov commented 2 years ago

@percyfal great job! Would it be possible to add an option for the users to choose between Illumina and Nextera (I guess those are the most common)? I remove Nextera adapters with Cutadapt like this:

cutadapt -a CTGTCTCTTATA --minimum-length 30 -o BC-0302374998.raw__raw_reads.merged.trimmed.fastq.gz BC-0302374998.raw__raw_reads.merged.fastq.gz -j 80

percyfal commented 2 years ago

Could there be a mix of adapters in a project? One way of doing this could be to add boolean configuration options for illumina and nextera, e.g. illumina_adapter and nextera_adapter, and let the list defined above be a list of whatever additional / custom adapter sequences the user wants to supply to the workflow. How does that sound?

NikolayOskolkov commented 2 years ago

Yes, this sounds good! I would set "illumina_adapter" by default and mention it in the documentation and give the users an option to switch to "nextera_adapter" if they want, or add their own adapter sequences

percyfal commented 2 years ago

@LeandroRitter Ok I updated the PR. Now adapters are defined in the adapters configuration section, with the following defaults:

adapters:
  illumina: true
  nextera: false
  custom: []

Custom adapters can be defined in adapters:custom. I was hesitant to organize it this way because it is an inconsistent mix of booleans and a list of strings; what do you think? Please make sure to read the update docs to verify you understand what I mean.