Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trimmomatic vs mslider Bioinformatics 1 04-18-2017 11:10 AM
Introducing CrossBlock, a BBTool for removing cross-contamination Brian Bushnell Bioinformatics 10 03-03-2017 11:23 PM
Adapter trimming with BBduk PeatMaster Illumina/Solexa 4 04-01-2016 12:18 PM
bbduk for mirna mapping danova Bioinformatics 1 02-03-2016 08:01 PM
bbduk and kmer masking cmccabe Bioinformatics 2 10-30-2015 11:16 AM

Thread Tools
Old 10-02-2017, 01:45 AM   #1
Junior Member
Location: UK

Join Date: Oct 2017
Posts: 5
Smile Removing contamination with BBDUK


I have just used BBDUK to remove adaptor sequence and phix from some raw illumina HiSeq 2X100bp reads and I'm really pleased with the improvement it has made in my sequences reported by FASTQC. I was just hoping someone could help me with a couple of questions to help me better understand how BBDUK removes contamination from a read, and if I'm using it correctly.

(1)When using BBDUK to remove adaptors, I chose to use mink to look for shorter adaptor sequence in my sequences than the chosen K=31 by using mink. Below are my parameters.

./ in=R1_001.fastq in2=R2_001.fastq minlen=51 mink=9 ktrim=r tbo tpe K=31 hdist=1 hdist2=1 ref=adapters.fa stats=stats_adaptor.txt out=R1_clean.fq out2=R2_clean.fq outm=ER1_adaptormatch.fq outm2=R2_adaptormatch.fq

This worked beautifully but it occurred to me that to use mink, I had to choose a side to trim from. I chose ktrim=r, but after I had done ktrim=r, am I meant to be repeating the process using the same commands as above and only changing ktrim=l so that both ends of the read have been checked for shorter kmers of contamination and then trimmed?

(2) My second question is about the removal of phix. I notice that in the post on seqanswers called "Introducing BBDuk: Adaptor/Quality Trimming and Filtering" that mink is not used unlike the adaptor search, just simply K=31. Is this because adaptor sequence is more likely to be present as a small fragment than the phix sequence?

I apologise if these are basic questions, I'm a masters student and I'm trying to ensure I thoroughly DQ my reads as well as understand all of the operations being performed.

Thank you all for your help.
glfrey is offline   Reply With Quote
Old 10-02-2017, 04:53 AM   #2
Senior Member
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,091

In Illumina data the adapter contamination should only be on the 3'-end of the read, if all things have gone as expected. So doing just ktrim=r is fine.

If your data was multiplexed (i.e. it had an index/tag) then you should not have to worry about phiX. Illumina's phiX does not have an index and should get discarded as part of the normal demultiplexing process.

@Brian recently provided this additional bbduk command to check for and remove phiX sequence and other known sequencing artifacts (e.g. control sequences from TruSeq kit).
Code: in=trimmed.fq.gz out=filtered.fq.gz k=31 ref=artifacts,phix ordered cardinality
GenoMax is offline   Reply With Quote
Old 10-02-2017, 05:08 AM   #3
Junior Member
Location: UK

Join Date: Oct 2017
Posts: 5

Hi GenoMax,

Thank you very much for your quick reply and explanations. I believe my data was multiplexed (it was already sequenced when I started my project), but BBDUK did find some phix sequence and discarded them into the outm files so I could be wrong. Also thank you for that command, I will give it a go on my sequences.
glfrey is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 11:29 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO