std::string Breakpoint::to_string() {
	std::stringstream ss;
	if (positions.support.size() > 1) {
		ss << "\t\tTREE: ";
		ss << TRANS_type(this->get_SVtype());
		ss << " ";
		ss << get_coordinates().start.min_pos;
		ss << ":";
		ss << get_coordinates().stop.max_pos;
		ss << " ";
		ss << this->length;
		ss << " ";
		ss << positions.support.size();
		ss << " ";
		ss << get_strand(2);
	}
	return ss.str();
}
Exemple #2
0
std::string BAMUtils::to_string() {
	std::ostringstream strm(std::ostringstream::app);
	strm << get_name(); //0
	strm << "\t";
	strm << get_strand(); //1

	strm << "\t";
	strm << get_t_start(); //2

	strm << "\t";
	strm << get_t_length(); //3

	strm << "\t";
	strm << get_q_length();//4

	strm << "\t";
	strm << get_match();//5
	strm << "\t";
	strm << get_percent_id();//6
	strm << "\t";
	strm << get_q_error();//7
	strm << "\t";

	strm << get_homo_errors();//8
	strm << "\t";
	strm << get_mismatch_errors();//9
	strm << "\t";
	strm << get_indel_errors();//10
	strm << "\t";

	strm << get_qdna();//12
	strm << "\t";
	strm << get_matcha();//13
	strm << "\t";
	strm << get_tdna();//14
	strm << "\t";
	strm << get_rname();//15
	strm << "\t";

	if (num_slop >= 0) {
		strm << num_slop;
		
	}else {
		strm << 0;//16
	}
	strm << "\t";
	
	std::vector<std::string> q_score_vec;
	split(q_scores, ',', q_score_vec);
	for (std::vector<std::string>::size_type i = 0; i < q_score_vec.size(); i++) {
		//strm << phred_lens[i];
		strm << get_phred_len((strtol(q_score_vec[i].c_str(),NULL, 10)));
		strm << "\t";
	}

	strm << get_full_q_length();
	strm << "\t";
	
	return strm.str();
	
}