16 template <
unsigned int IDLEN,
unsigned int SEQLEN>
21 ShortRead(
const string & s_id,
const string & s_seq,
const string & s_qual)
24 s_seq.copy(
seq, SEQLEN);
25 s_qual.copy(qual, SEQLEN);
31 template <
unsigned int NS_IDLEN,
unsigned int NS_SEQLEN>
32 friend ostream& operator<<( ostream& os, const ShortRead<NS_IDLEN,NS_SEQLEN> & sread);
39 template <
typename IT,
unsigned int NS_IDLEN,
unsigned int NS_SEQLEN>
43 template <
unsigned int IDLEN,
unsigned int SEQLEN>
44 ostream& operator<<(ostream& os, const ShortRead<IDLEN, SEQLEN> & sread )
46 os << sread.id <<
" " << sread.seq <<
" " << sread.qual << endl;
51 template <
class IT,
unsigned int IDLEN,
unsigned int SEQLEN>
60 return MPIType< ShortRead<IDLEN,SEQLEN> >();
65 size_t entryLength = fread (&ind,
sizeof(ind),1,rFile);
68 cout <<
"Not enough bytes read in binaryfill " << endl;
72 template <
typename c,
typename t>
75 string s_id, s_seq, s_qual, s_null;
84 template <
typename c,
typename t>
93 int main(
int argc,
char* argv[])
96 MPI_Init(&argc, &argv);
97 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
98 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
104 cout <<
"Usage: ./VectorIOPermute <VectorFile>" << endl;
105 cout <<
"<VectorFile> is a binary file" << endl;
void binaryfill(FILE *rFile, IT &ind, ShortRead< IDLEN, SEQLEN > &val)
ShortRead< IDLEN, SEQLEN > read(std::basic_istream< c, t > &is, IT ind)
ShortRead(const string &s_id, const string &s_seq, const string &s_qual)
ShortRead< IDLEN, SEQLEN > getNoNum(IT ind)
void save(std::basic_ostream< c, t > &os, const ShortRead< IDLEN, SEQLEN > &tw, IT ind)
int main(int argc, char *argv[])
MPI_Datatype getMPIType()
std::ifstream & ReadDistribute(std::ifstream &infile, int master, HANDLER handler)
Totally obsolete version that only accepts an ifstream object and ascii files.
Collection of Generic Sequential Functions.