NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Macros | Enumerations | Enumerator | Functions | Variables
SequenceIODetail

Detailed Description

Namespaces

 nvbio::io
 

Classes

struct  nvbio::io::SequenceDataFile_BAM
 
struct  nvbio::io::SequenceDataFile_FASTA_gz
 
struct  nvbio::io::SequenceDataOutputFile_FASTA
 
struct  nvbio::io::SequenceDataFile_FASTQ_parser
 
struct  nvbio::io::SequenceDataFile_FASTQ_gz
 
struct  nvbio::io::SequenceDataOutputFile_FASTQ
 
struct  nvbio::io::SequenceDataFile
 
struct  nvbio::io::SequenceDataFile_SAM
 
struct  nvbio::io::SequenceDataFile_TXT
 
struct  nvbio::io::SequenceDataFile_TXT_gz
 
struct  nvbio::io::SequenceDataOutputFile_TXT
 

Macros

#define GZREAD(field)
 
#define GZFWD(bytes)   gzseek(fp, (bytes), SEEK_CUR)
 
#define GZSKIP(field)   gzseek(fp, sizeof(field), SEEK_CUR)
 

Enumerations

enum  nvbio::io::AlignmentFlags {
  nvbio::io::SAMFlag_MultipleSegments = 0x1, nvbio::io::SAMFlag_AllSegmentsAligned = 0x2, nvbio::io::SAMFlag_SegmentUnmapped = 0x4, nvbio::io::SAMFlag_NextSegmentUnmapped = 0x8,
  nvbio::io::SAMFlag_ReverseComplemented = 0x10, nvbio::io::SAMFlag_NextSegmentReverseComplemented = 0x20, nvbio::io::SAMFlag_FirstSegment = 0x40, nvbio::io::SAMFlag_LastSegment = 0x80,
  nvbio::io::SAMFlag_SecondaryAlignment = 0x100, nvbio::io::SAMFlag_FailedQC = 0x200, nvbio::io::SAMFlag_Duplicate = 0x400, nvbio::io::SAMFlag_MultipleSegments = 0x1,
  nvbio::io::SAMFlag_AllSegmentsAligned = 0x2, nvbio::io::SAMFlag_SegmentUnmapped = 0x4, nvbio::io::SAMFlag_NextSegmentUnmapped = 0x8, nvbio::io::SAMFlag_ReverseComplemented = 0x10,
  nvbio::io::SAMFlag_NextSegmentReverseComplemented = 0x20, nvbio::io::SAMFlag_FirstSegment = 0x40, nvbio::io::SAMFlag_LastSegment = 0x80, nvbio::io::SAMFlag_SecondaryAlignment = 0x100,
  nvbio::io::SAMFlag_FailedQC = 0x200, nvbio::io::SAMFlag_Duplicate = 0x400
}
 
enum  { nvbio::io::SequenceDataFile_SAM::LINE_BUFFER_INIT_SIZE = 1024 }
 
enum  nvbio::io::SequenceDataFile_SAM::SortOrder { nvbio::io::SequenceDataFile_SAM::SortOrder_unknown, nvbio::io::SequenceDataFile_SAM::SortOrder_unsorted, nvbio::io::SequenceDataFile_SAM::SortOrder_queryname, nvbio::io::SequenceDataFile_SAM::SortOrder_coordinate }
 

Functions

 nvbio::io::SequenceDataFile_SAM::SequenceDataFile_SAM (const char *read_file_name, const SequenceDataFile::Options &options)
 
virtual int nvbio::io::SequenceDataFile_SAM::nextChunk (struct SequenceDataEncoder *output, uint32 max_reads, uint32 max_bps)
 
virtual bool nvbio::io::SequenceDataFile_SAM::rewind ()
 
bool nvbio::io::SequenceDataFile_SAM::init (void)
 
 nvbio::io::SequenceDataFile_BAM::SequenceDataFile_BAM (const char *read_file_name, const SequenceDataFile::Options &options)
 
bool nvbio::io::SequenceDataFile_BAM::init (void)
 
virtual bool nvbio::io::SequenceDataFile_BAM::rewind ()
 
virtual int nvbio::io::SequenceDataFile_BAM::nextChunk (struct SequenceDataEncoder *output, uint32 max_reads, uint32 max_bps)
 
 nvbio::io::SequenceDataFile_FASTA_gz::SequenceDataFile_FASTA_gz (const char *read_file_name, const SequenceDataFile::Options &options)
 
bool nvbio::io::SequenceDataFile_FASTA_gz::rewind ()
 
int nvbio::io::SequenceDataFile_FASTA_gz::nextChunk (SequenceDataEncoder *output, uint32 max_reads, uint32 max_bps)
 
 nvbio::io::SequenceDataOutputFile_FASTA::SequenceDataOutputFile_FASTA (const char *file_name, const char *compressor, const char *options)
 
void nvbio::io::SequenceDataOutputFile_FASTA::next (const SequenceDataHost &sequence_data)
 
bool nvbio::io::SequenceDataOutputFile_FASTA::is_ok ()
 
virtual int nvbio::io::SequenceDataFile_FASTQ_parser::nextChunk (struct SequenceDataEncoder *output, uint32 max_reads, uint32 max_bps)
 
 nvbio::io::SequenceDataFile_FASTQ_gz::SequenceDataFile_FASTQ_gz (const char *read_file_name, const SequenceDataFile::Options &options)
 
 nvbio::io::SequenceDataFile_FASTQ_gz::~SequenceDataFile_FASTQ_gz ()
 
virtual FileState nvbio::io::SequenceDataFile_FASTQ_gz::fillBuffer (void)
 
virtual bool nvbio::io::SequenceDataFile_FASTQ_gz::rewind ()
 
 nvbio::io::SequenceDataOutputFile_FASTQ::SequenceDataOutputFile_FASTQ (const char *file_name, const char *compressor, const char *options)
 
void nvbio::io::SequenceDataOutputFile_FASTQ::next (const SequenceDataHost &sequence_data)
 
bool nvbio::io::SequenceDataOutputFile_FASTQ::is_ok ()
 
virtual int nvbio::io::SequenceDataFile_TXT::nextChunk (struct SequenceDataEncoder *output, uint32 max_reads, uint32 max_bps)
 
 nvbio::io::SequenceDataFile_TXT_gz::SequenceDataFile_TXT_gz (const char *read_file_name, const Options &options, const uint32 buffer_size=64536u)
 
 nvbio::io::SequenceDataFile_TXT_gz::~SequenceDataFile_TXT_gz ()
 
virtual bool nvbio::io::SequenceDataFile_TXT_gz::rewind ()
 
virtual FileState nvbio::io::SequenceDataFile_TXT_gz::fillBuffer (void)
 
 nvbio::io::SequenceDataOutputFile_TXT::SequenceDataOutputFile_TXT (const char *file_name, const char *compressor, const char *options)
 
void nvbio::io::SequenceDataOutputFile_TXT::next (const SequenceDataHost &sequence_data)
 
bool nvbio::io::SequenceDataOutputFile_TXT::is_ok ()
 

Variables

std::vector< std::string > nvbio::io::SequenceDataFile_SAM::sq_names
 
std::vector< uint64 > nvbio::io::SequenceDataFile_SAM::sq_lengths
 

Macro Definition Documentation

#define GZFWD (   bytes)    gzseek(fp, (bytes), SEEK_CUR)

Definition at line 105 of file sequence_bam.cpp.

#define GZREAD (   field)
Value:
if (readData(&(field), sizeof(field)) == false) { \
return error; \
}

Definition at line 98 of file sequence_bam.cpp.

#define GZSKIP (   field)    gzseek(fp, sizeof(field), SEEK_CUR)

Definition at line 109 of file sequence_bam.cpp.

Enumeration Type Documentation

anonymous enum
Enumerator
LINE_BUFFER_INIT_SIZE 

Definition at line 84 of file sequence_sam.h.

flag comments come from SAMtools spec a better explanation is available at: http://genome.sph.umich.edu/wiki/SAM#What_Information_Does_SAM.2FBAM_Have_for_an_Alignment

Enumerator
SAMFlag_MultipleSegments 
SAMFlag_AllSegmentsAligned 
SAMFlag_SegmentUnmapped 
SAMFlag_NextSegmentUnmapped 
SAMFlag_ReverseComplemented 
SAMFlag_NextSegmentReverseComplemented 
SAMFlag_FirstSegment 
SAMFlag_LastSegment 
SAMFlag_SecondaryAlignment 
SAMFlag_FailedQC 
SAMFlag_Duplicate 
SAMFlag_MultipleSegments 
SAMFlag_AllSegmentsAligned 
SAMFlag_SegmentUnmapped 
SAMFlag_NextSegmentUnmapped 
SAMFlag_ReverseComplemented 
SAMFlag_NextSegmentReverseComplemented 
SAMFlag_FirstSegment 
SAMFlag_LastSegment 
SAMFlag_SecondaryAlignment 
SAMFlag_FailedQC 
SAMFlag_Duplicate 

Definition at line 53 of file sequence_sam.h.

Enumerator
SortOrder_unknown 
SortOrder_unsorted 
SortOrder_queryname 
SortOrder_coordinate 

Definition at line 86 of file sequence_sam.h.

Function Documentation

SequenceDataFile_TXT::FileState nvbio::io::SequenceDataFile_TXT_gz::fillBuffer ( void  )
virtual

fill the buffer

Implements nvbio::io::SequenceDataFile_TXT.

Definition at line 242 of file sequence_txt.cpp.

SequenceDataFile_FASTQ_parser::FileState nvbio::io::SequenceDataFile_FASTQ_gz::fillBuffer ( void  )
virtual

Implements nvbio::io::SequenceDataFile_FASTQ_parser.

Definition at line 327 of file sequence_fastq.cpp.

bool nvbio::io::SequenceDataFile_BAM::init ( void  )

initialize the stream

Definition at line 112 of file sequence_bam.cpp.

bool nvbio::io::SequenceDataFile_SAM::init ( void  )

Definition at line 148 of file sequence_sam.cpp.

bool nvbio::io::SequenceDataOutputFile_FASTA::is_ok ( void  )
virtual

return whether the stream is ok

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 245 of file sequence_fasta.cpp.

bool nvbio::io::SequenceDataOutputFile_TXT::is_ok ( void  )
virtual

return whether the stream is ok

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 330 of file sequence_txt.cpp.

bool nvbio::io::SequenceDataOutputFile_FASTQ::is_ok ( void  )
virtual

return whether the stream is ok

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 458 of file sequence_fastq.cpp.

void nvbio::io::SequenceDataOutputFile_FASTA::next ( const SequenceDataHost sequence_data)
virtual

next batch

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 227 of file sequence_fasta.cpp.

void nvbio::io::SequenceDataOutputFile_TXT::next ( const SequenceDataHost sequence_data)
virtual

next batch

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 312 of file sequence_txt.cpp.

void nvbio::io::SequenceDataOutputFile_FASTQ::next ( const SequenceDataHost sequence_data)
virtual

next batch

Implements nvbio::io::SequenceDataOutputStream.

Definition at line 440 of file sequence_fastq.cpp.

int nvbio::io::SequenceDataFile_FASTA_gz::nextChunk ( SequenceDataEncoder output,
uint32  max_reads,
uint32  max_bps 
)
virtual

get a chunk of reads

Implements nvbio::io::SequenceDataFile.

Definition at line 153 of file sequence_fasta.cpp.

int nvbio::io::SequenceDataFile_BAM::nextChunk ( struct SequenceDataEncoder output,
uint32  max_reads,
uint32  max_bps 
)
virtual

read the next chunk

Implements nvbio::io::SequenceDataFile.

Definition at line 182 of file sequence_bam.cpp.

int nvbio::io::SequenceDataFile_TXT::nextChunk ( struct SequenceDataEncoder output,
uint32  max_reads,
uint32  max_bps 
)
protectedvirtual

Implements nvbio::io::SequenceDataFile.

Definition at line 47 of file sequence_txt.cpp.

int nvbio::io::SequenceDataFile_FASTQ_parser::nextChunk ( struct SequenceDataEncoder output,
uint32  max_reads,
uint32  max_bps 
)
protectedvirtual

Implements nvbio::io::SequenceDataFile.

Definition at line 48 of file sequence_fastq.cpp.

int nvbio::io::SequenceDataFile_SAM::nextChunk ( struct SequenceDataEncoder output,
uint32  max_reads,
uint32  max_bps 
)
virtual

load the next chunk

Implements nvbio::io::SequenceDataFile.

Definition at line 364 of file sequence_sam.cpp.

bool nvbio::io::SequenceDataFile_BAM::rewind ( void  )
virtual

rewind the file

Implements nvbio::io::SequenceDataInputStream.

Definition at line 170 of file sequence_bam.cpp.

bool nvbio::io::SequenceDataFile_FASTA_gz::rewind ( void  )
virtual

rewind the file

Implements nvbio::io::SequenceDataInputStream.

Definition at line 141 of file sequence_fasta.cpp.

bool nvbio::io::SequenceDataFile_SAM::rewind ( void  )
virtual

rewind the file

Implements nvbio::io::SequenceDataInputStream.

Definition at line 345 of file sequence_sam.cpp.

bool nvbio::io::SequenceDataFile_TXT_gz::rewind ( void  )
virtual

rewind the file

Implements nvbio::io::SequenceDataInputStream.

Definition at line 227 of file sequence_txt.cpp.

bool nvbio::io::SequenceDataFile_FASTQ_gz::rewind ( void  )
virtual

rewind the file

Implements nvbio::io::SequenceDataInputStream.

Definition at line 356 of file sequence_fastq.cpp.

nvbio::io::SequenceDataFile_BAM::SequenceDataFile_BAM ( const char *  read_file_name,
const SequenceDataFile::Options options 
)

constructor

Definition at line 50 of file sequence_bam.cpp.

nvbio::io::SequenceDataFile_FASTA_gz::SequenceDataFile_FASTA_gz ( const char *  read_file_name,
const SequenceDataFile::Options options 
)

constructor

Definition at line 126 of file sequence_fasta.cpp.

nvbio::io::SequenceDataFile_FASTQ_gz::SequenceDataFile_FASTQ_gz ( const char *  read_file_name,
const SequenceDataFile::Options options 
)

Definition at line 305 of file sequence_fastq.cpp.

nvbio::io::SequenceDataFile_SAM::SequenceDataFile_SAM ( const char *  read_file_name,
const SequenceDataFile::Options options 
)

constructor

Definition at line 39 of file sequence_sam.cpp.

nvbio::io::SequenceDataFile_TXT_gz::SequenceDataFile_TXT_gz ( const char *  read_file_name,
const Options options,
const uint32  buffer_size = 64536u 
)

Definition at line 204 of file sequence_txt.cpp.

nvbio::io::SequenceDataOutputFile_FASTA::SequenceDataOutputFile_FASTA ( const char *  file_name,
const char *  compressor,
const char *  options 
)

constructor

Definition at line 169 of file sequence_fasta.cpp.

nvbio::io::SequenceDataOutputFile_FASTQ::SequenceDataOutputFile_FASTQ ( const char *  file_name,
const char *  compressor,
const char *  options 
)

constructor

Definition at line 373 of file sequence_fastq.cpp.

nvbio::io::SequenceDataOutputFile_TXT::SequenceDataOutputFile_TXT ( const char *  file_name,
const char *  compressor,
const char *  options 
)

constructor

Definition at line 270 of file sequence_txt.cpp.

nvbio::io::SequenceDataFile_FASTQ_gz::~SequenceDataFile_FASTQ_gz ( )

Definition at line 320 of file sequence_fastq.cpp.

nvbio::io::SequenceDataFile_TXT_gz::~SequenceDataFile_TXT_gz ( )

Definition at line 220 of file sequence_txt.cpp.

Variable Documentation

std::vector<uint64> nvbio::io::SequenceDataFile_SAM::sq_lengths

Definition at line 129 of file sequence_sam.h.

std::vector<std::string> nvbio::io::SequenceDataFile_SAM::sq_names

Definition at line 128 of file sequence_sam.h.