Skip to content

Commit a4ac0ac

Browse files
committed
deduplicate adapter sequences in fasta file, for example when the same adapter is listed for multiple samples in a batch processing
1 parent ef5e33a commit a4ac0ac

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/options.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ void Options::loadFastaAdapters() {
6464
map<string, string>::iterator iter;
6565
for(iter = contigs.begin(); iter != contigs.end(); iter++) {
6666
if(iter->second.length()>=6) {
67+
// deduplicate adapter sequences in fasta file, for example when the same adapter is listed for multiple samples in a batch processing
68+
if(find(adapter.seqsInFasta.begin(), adapter.seqsInFasta.end(), iter->second) != adapter.seqsInFasta.end())
69+
continue;
6770
adapter.seqsInFasta.push_back(iter->second);
6871
}
6972
else {

0 commit comments

Comments
 (0)