SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bfc/vfc c/c++ api dehvidc1 Bioinformatics 2 12-19-2012 03:57 AM
Are there any good ways to use SAMtools java API to convert .bam file into .txt file? alextree Bioinformatics 8 01-24-2012 10:20 AM
Samtools C API + SOLID reads Koskos Bioinformatics 0 09-05-2011 04:55 AM
pathways API KEGG svl Bioinformatics 5 02-10-2011 02:37 PM
samtools c api blu78 Bioinformatics 6 09-07-2010 07:43 AM

Reply
 
Thread Tools
Old 12-03-2010, 02:59 PM   #1
wokai001
Member
 
Location: Düsseldorf

Join Date: Nov 2010
Posts: 20
Default samtools c++ api

I would like to read and write bam files within c++. For that I downloaded the source code files and tried to get the SAMtools Example c program running.

Upon compiling I get an Error message

../src/samtools/bam_reheader.c: In function ‘bam_reheader’:
../src/samtools/bam_reheader.c:28: error: ‘BGZF’ has no member named ‘x’

In "bam_reheader" I found:
Code:
// line 10: BGZF *fp;
#ifdef _USE_KNETFILE
	while ((len = knet_read(in->x.fpr, buf, BUF_SIZE)) > 0)
#else
	while (!feof(in->file) && (len = fread(buf, 1, BUF_SIZE, in->file)) > 0)
#endif
		fwrite(buf, 1, len, fp->x.fpw);           // this is line 28
where line 28 obviously is not affected by the definition of _USE_KNETFILE.

Upon looking up the definition of BGZF which is located in "bgzf.h", I found the following:
Code:
#ifdef _USE_KNETFILE
	union {
		knetFile *fpr;
		FILE *fpw;
	} x;
So, when _USE_KNETFILE is not declared, the member x is not included in the declaration of BGZF but expected to exist later on. At first sight, this seems to be an error in the source code.

Did anyone else encounter this problem or does anyone know a solution?

Thanks very much.
Wolfgang
wokai001 is offline   Reply With Quote
Old 12-04-2010, 12:02 AM   #2
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Try posting to the samtools help list: samtools-help@lists.sourceforge.net
nilshomer is offline   Reply With Quote
Old 12-04-2010, 02:01 AM   #3
wokai001
Member
 
Location: Düsseldorf

Join Date: Nov 2010
Posts: 20
Default Sent a copy

Quote:
Originally Posted by nilshomer View Post
Try posting to the samtools help list: samtools-help@lists.sourceforge.net
Yes, I Found the SourceForge support Site with your remark.
Sent a copy of the post.

Thank you
Wolfgang
wokai001 is offline   Reply With Quote
Reply

Tags
api, c++, samtools

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 06:46 PM.


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