コード例 #1
0
void Locus :: OutputTo (RGTextOutput& xmlFile) {

	xmlFile << "\t\t\t<Locus>\n";
	xmlFile << "\t\t\t\t<Name>" << mName.GetData () << "</Name>\n";
	xmlFile << "\t\t\t\t<Channel>" << mChannel << "</Channel>\n";

	if (mDoNotExtend)
		xmlFile << "\t\t\t\t<NoExtension>true</NoExtension>\n";

	xmlFile << "\t\t\t\t<MinBP>" << mMinLocusBP << "</MinBP>\n";
	xmlFile << "\t\t\t\t<MaxBP>" << mMaxLocusBP << "</MaxBP>\n";

	if (GetGenerateILSFamilies ()) {

		xmlFile << "\t\t\t\t<SearchRegions>\n";
		xmlFile << "\t\t\t\t\t<Region>\n";
		xmlFile << "\t\t\t\t\t\t<ILSName>" << GetILSName () << "</ILSName>\n";
		xmlFile << "\t\t\t\t\t\t<MinGrid>" << 0.01 * floor (100.0 * mMinSearchILSBP + 0.5) << "</MinGrid>\n";
		xmlFile << "\t\t\t\t\t\t<MaxGrid>" << 0.01 * floor (100.0 * mMaxSearchILSBP + 0.5) << "</MaxGrid>\n";
		xmlFile << "\t\t\t\t\t</Region>\n";
		xmlFile << "\t\t\t\t</SearchRegions>\n";
	}

	else {

		xmlFile << "\t\t\t\t<MinGridLSBasePair>" << 0.01 * floor (100.0 * mMinSearchILSBP + 0.5) << "</MinGridLSBasePair>\n";
		xmlFile << "\t\t\t\t<MaxGridLSBasePair>" << 0.01 * floor (100.0 * mMaxSearchILSBP + 0.5) << "</MaxGridLSBasePair>\n";
	}

	if (mCoreRepeat != 4)
		xmlFile << "\t\t\t\t<CoreRepeatNumber>" << mCoreRepeat << "</CoreRepeatNumber>\n";

	if (mYLinked)
		xmlFile << "\t\t\t\t<YLinked>true</YLinked>\n";

	if (mMaxExpectedAlleles != 2)
		xmlFile << "\t\t\t\t<MaxExpectedAlleles>" << mMaxExpectedAlleles << "</MaxExpectedAlleles>\n";

	if (mMinExpectedAlleles != 1)
		xmlFile << "\t\t\t\t<MinExpectedAlleles>" << mMinExpectedAlleles << "</MinExpectedAlleles>\n";

	xmlFile << "\t\t\t\t<LadderAlleles>\n";

	list <Allele*>::const_iterator AIterator;
	Allele* nextAllele;

	for (AIterator = mAlleleList.begin(); AIterator != mAlleleList.end(); AIterator++) {

		nextAllele = *AIterator;

		if (mNeedsRelativeHeightInfo)
			nextAllele->SetRelativeHeight ("H");

		nextAllele->OutputTo (xmlFile);
	}

	xmlFile << "\t\t\t\t</LadderAlleles>\n";
	xmlFile << "\t\t\t</Locus>\n";
}
コード例 #2
0
void Locus :: OutputTo (RGTextOutput& xmlFile) {

	xmlFile << "\t\t\t<Locus>\n";
	xmlFile << "\t\t\t\t<Name>" << mName.GetData () << "</Name>\n";
	xmlFile << "\t\t\t\t<Channel>" << mChannel << "</Channel>\n";
	xmlFile << "\t\t\t\t<MinBP>" << mMinLocusBP << "</MinBP>\n";
	xmlFile << "\t\t\t\t<MaxBP>" << mMaxLocusBP << "</MaxBP>\n";
	xmlFile << "\t\t\t\t<MinGridLSBasePair>" << 0.01 * floor (100.0 * mMinSearchILSBP + 0.5) << "</MinGridLSBasePair>\n";
	xmlFile << "\t\t\t\t<MaxGridLSBasePair>" << 0.01 * floor (100.0 * mMaxSearchILSBP + 0.5) << "</MaxGridLSBasePair>\n";

	if (mCoreRepeat != 4)
		xmlFile << "\t\t\t\t<CoreRepeatNumber>" << mCoreRepeat << "</CoreRepeatNumber>\n";

	if (mYLinked)
		xmlFile << "\t\t\t\t<YLinked>true</YLinked>\n";

	if (mMaxExpectedAlleles != 2)
		xmlFile << "\t\t\t\t<MaxExpectedAlleles>" << mMaxExpectedAlleles << "</MaxExpectedAlleles>\n";

	if (mMinExpectedAlleles != 1)
		xmlFile << "\t\t\t\t<MinExpectedAlleles>" << mMinExpectedAlleles << "</MinExpectedAlleles>\n";

	xmlFile << "\t\t\t\t<LadderAlleles>\n";

	list <Allele*>::const_iterator AIterator;
	Allele* nextAllele;

	for (AIterator = mAlleleList.begin(); AIterator != mAlleleList.end(); AIterator++) {

		nextAllele = *AIterator;
		nextAllele->OutputTo (xmlFile);
	}

	xmlFile << "\t\t\t\t</LadderAlleles>\n";
	xmlFile << "\t\t\t</Locus>\n";
}