Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c++]

The tag has no usage guidance.

1
vote
1answer
83 views

Non-random access on a fastq file

There was a nice question on random access on a fastq file, however I have the opposite problem. I want to programatically access non-random fastq entries quickly (using C++). Say I have several ...
2
votes
1answer
35 views

How is consensus alignment for OLC assembly usually implemented?

Background In C++ I want to implement a simple class that performs overlap layout consensus assembly but I can not figure out the most logical data structure to use for the consensus alignment step. ...
6
votes
1answer
103 views

Multithread fastq processing with kseq.h in C++11?

Background I am using the wonderful kseq.h as my fastq/fasta parser for a C++ project. My actual implementation uses something like this, where I am counting kmers ...
8
votes
1answer
317 views

What is the most compact data structure for canonical k-mers with the fastest lookup time?

edit: Results are current as of Dec 4, 2018 13:00 PST. Background K-mers have many uses in bioinformatics, and for this reason it would be useful to know the most RAM-efficient and fastest way to ...
0
votes
1answer
71 views

While opening a Bam file with the SeqAn library I get 'seqan::FileOpenError' [closed]

When I try to open a simple bam file with the SeqAn library using the following code: ...
3
votes
1answer
142 views

How to use C++ htslib to read VCF contig name and size?

A typical VCF file has: ##contig=<ID=chr1,length=248956422> ##contig=<ID=chr2,length=242193529> I would like to use ...
8
votes
3answers
299 views

How to calculate the memory usage of storing kmers in RAM

I want to write a program in C++ that stores kmers in a hash or in a trie. How can I calculate how much RAM I would need for each type of data structure? For this application my kmers are strand-...
7
votes
2answers
245 views

How to write a hash function for canonical kmers?

This question is a follow up from How do kmer counters determine which kmer is 'canonical'?. In that question we learned that kmer counting programs use a 2-bit hash function to internally represent ...
5
votes
3answers
198 views

Read sorted and indexed BAM files faster in C++?

I have some sorted and indexed alignment large BAM files. I'd like to read all the reads, and apply custom operation on each of them. The orders aren't important. I'm using ...
6
votes
1answer
334 views

How to build a BAM header file with htslib in C++?

I'd like to use C++ to generate a new BAM file programmatically. This is an example how to use htslib to generate a new BCF file on the fly. https://github.com/samtools/htslib/blob/develop/test/...