m_uTrackSize(uTrackSize == 0 ? size_t( -1 ) : uTrackSize)
80m_uTrackSize(uTrackSize == 0 ? size_t( -1 ) : uTrackSize)
130 constlist< CRef<CSeq_graph> >& graphs = annot.
GetData().
GetGraph();
131list< CRef<CSeq_graph> >::const_iterator it = graphs.begin();
132 while( it != graphs.end() ) {
183 m_Os<<
"track type=wiggle_0"<<
'\n';
191 stringstrTrackLine(
"track type=wiggle_0");
193 constlist<CRef< CAnnotdesc > >&
data= descr.
Get();
194list< CRef< CAnnotdesc > >::const_iterator it =
data.begin();
195 while( it !=
data.end() ) {
196 if( (*it)->IsName() ) {
197strTrackLine +=
" name=\"";
198strTrackLine += (*it)->GetName();
199strTrackLine +=
"\"";
201 if( ! (*it)->IsUser() ) {
217 constvector< CRef< CUser_field > >& fields = user.
GetData();
218 for(
size_tu=0; u < fields.size(); ++u ) {
220strTrackLine +=
" ";
222strTrackLine +=
"=";
229 m_Os<< strTrackLine <<
'\n';
239 stringstrFixedStep(
"fixedStep");
252 switch( pId->
Which() ) {
272strFixedStep +=
string(
" chrom=");
273strFixedStep += strChrom;
276 stringstrStart(
" start=");
281uFrom =
location.GetInt().GetFrom();;
285strFixedStep += strStart;
288 stringstrSpan(
" span=");
289 stringstrStep(
" step=");
293strFixedStep += strStep;
295strFixedStep += strSpan;
297 m_Os<< strFixedStep <<
'\n';
304 size_tuStartRecord )
316 doubledA = graph.
GetA();
317 doubledB = graph.
GetB();
321 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
327 "Processing terminated by user");
330 intiVal = (
unsignedchar)values[u + uStartRecord];
340 size_tuStartRecord )
352 doubledA = graph.
GetA();
353 doubledB = graph.
GetB();
357 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
363 "Processing terminated by user");
366 doubledVal = values[u + uStartRecord];
367 m_Os<< (dA*dVal+dB) <<
'\n';
376 size_tuStartRecord )
388 doubledA = graph.
GetA();
389 doubledB = graph.
GetB();
393 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
399 "Processing terminated by user");
402 doubledVal = values[u + uStartRecord];
403 m_Os<< ( dA*dVal+dB ) <<
'\n';
412 size_tuStartRecord )
423 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
424 intiVal = (
unsignedchar)values[u + uStartRecord];
435 size_tuStartRecord )
446 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
447 intiVal = (
unsignedchar)values[u + uStartRecord];
458 size_tuStartRecord )
469 for(
size_tu=0; u + uStartRecord < uNumVals && u <
m_uTrackSize; ++u ) {
470 intiVal = (
unsignedchar)values[u + uStartRecord];
495 intspan(0), start(0), step(0);
519span = start = step = 0;
531step = currentIn - start;
533 intnumRows =
table.GetNum_rows();
534 for(
int i=1;
i< numRows-1; ++
i) {
539 if(nextIn-currentIn != step) {
560 intnumRows =
table.GetNum_rows();
567 for(
int i=1;
i< numRows; ++
i) {
575 constvector<CRef<CSeqTable_column> >
columns=
table.GetColumns();
576 for(
size_tu = 0; u <
columns.size(); ++u) {
580 if(fieldName ==
"span") {
581 for(
size_t i=0;
i< numRows; ++
i) {
583 if(!
columns[u]->TryGetInt(
i, curspan)) {
589 else if(curspan != span) {
603 const string& chromId,
613 stringchrom(chromId);
621 m_Os<<
"fixedStep chrom="<< chrom <<
" span="<< span <<
622 " start="<< (start+1) <<
" step="<< step <<
'\n';
625 intnumRows =
table.GetNum_rows();
626 for(
int i=0;
i< numRows; ++
i) {
632 "Processing terminated by user");
647 const string& chromId,
656 stringchrom(chromId);
664 m_Os<<
"variableStep chrom="<< chrom <<
" span="<< span <<
'\n';
667 intnumRows =
table.GetNum_rows();
668 for(
int i=0;
i< numRows; ++
i) {
674 "Processing terminated by user");
685 m_Os<< (posIn+1) <<
'\t'<<
value<<
'\n';
706 intnumRows =
table.GetNum_rows();
709 for(
int i=0;
i< numRows; ++
i) {
715 "Processing terminated by user");
722 autoidIt = bestIdCache.
find(chrom);
723 if(idIt != bestIdCache.
end()) {
724chrom = idIt->second;
730bestIdCache[chrom] = bestId;
734bestIdCache[chrom] = chrom;
752 #define BED_AS_VARSTEP 1 754 autospan = posOut - posIn;
755 if(span != lastSpan) {
756 m_Os<<
"variableStep chrom="<< chrom <<
" span="<< span <<
'\n';
759 m_Os<< posIn+1 <<
'\t'<<
value<<
'\n';
761 m_Os<< chrom <<
'\t'<< (posIn + 1) <<
'\t'<< (posOut + 1) <<
'\t'<<
value<<
'\n';
774 constvector<CRef<CSeqTable_column> >
columns=
table.GetColumns();
775 for(
size_tu = 0; u <
columns.size(); ++u) {
779 if(fieldName ==
"Seq-table location") {
814 constvector<CRef<CSeqTable_column> >
columns=
table.GetColumns();
815 for(
size_tu = 0; u <
columns.size(); ++u) {
820 return(
columns[u]->TryGetInt(index, posIn));
835 constvector<CRef<CSeqTable_column> >
columns=
table.GetColumns();
836 for(
size_tu = 0; u <
columns.size(); ++u) {
840 if(fieldName ==
"span") {
841 if(!
columns[u]->TryGetInt(index, posOut)) {
851 return(
columns[u]->TryGetInt(index, posOut));
865 constvector<CRef<CSeqTable_column> >
columns=
table.GetColumns();
866 for(
size_tu = 0; u <
columns.size(); ++u) {
870 if(fieldName ==
"values") {
873 if(!
columns[u]->TryGetInt(index, intValue)) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
bool IsSeq_table(void) const
bool xWriteSingleGraphRecordsReal(const CSeq_graph &, size_t)
bool xIsVariableStepData(const CSeq_table &, string &, int &)
bool xWriteAnnotGraphs(const CSeq_annot &)
bool xWriteTrackLine(const CAnnot_descr &)
bool xWriteSingleGraphRecordsByte(const CSeq_graph &, size_t)
bool xWriteSingleGraphRecordsInt(const CSeq_graph &, size_t)
bool xTableGetValue(const CSeq_table &, int, double &)
bool xTableGetPosIn(const CSeq_table &, int, int &)
bool WriteAnnot(const CSeq_annot &, const string &="", const string &="") override
Write a raw Seq-annot to the internal output stream.
bool xWriteTableFixedStep(const CSeq_table &, const string &, int, int, int)
bool WriteFooter() override
Write a file trailer.
bool xWriteSingleGraph(const CSeq_graph &)
bool xTableGetChromName(const CSeq_table &, int, string &)
bool xWriteTableVariableStep(const CSeq_table &, const string &, int)
bool xTableGetPosOut(const CSeq_table &, int, int, int &)
bool xWriteTableBedStyle(const CSeq_table &)
bool xWriteSingleGraphFixedStep(const CSeq_graph &, size_t)
~CWiggleWriter() override
bool xWriteDefaultTrackLine()
bool xWriteAnnotTable(const CSeq_annot &)
bool xContainsDataInt(const CSeq_graph &, size_t)
bool xContainsDataByte(const CSeq_graph &, size_t)
CWiggleWriter(CScope &, CNcbiOstream &, size_t=0)
bool xIsFixedStepData(const CSeq_table &, string &, int &, int &, int &)
bool xContainsDataReal(const CSeq_graph &, size_t)
Defines and provides stubs for a general interface to a variety of file formatters.
bool GetBestId(CSeq_id_Handle idh, CScope &scope, string &best_id) const
const_iterator end() const
const_iterator find(const key_type &key) const
static const char location[]
static const column_t columns[]
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
@ eContent
Untagged human-readable accession or the like.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
bool CanGetType(void) const
Check if it is safe to call GetType method.
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
TField_id GetField_id(void) const
Get the Field_id member data.
bool IsSetField_name(void) const
any column can be identified by ASN.1 text locator string with omitted object type.
bool IsSetField_id(void) const
Check if a value has been assigned to Field_id data member.
const TField_name & GetField_name(void) const
Get the Field_name member data.
@ eField_id_location_id
location Seq-id
@ eField_id_location_to
interval to
@ eField_id_location_from
interval from
E_Choice Which(void) const
Which variant is currently selected.
const TLocal & GetLocal(void) const
Get the variant data.
bool CanGetComp(void) const
Check if it is safe to call GetComp method.
bool CanGetValues(void) const
Check if it is safe to call GetValues method.
bool CanGetNumval(void) const
Check if it is safe to call GetNumval method.
bool CanGetValues(void) const
Check if it is safe to call GetValues method.
bool CanGetA(void) const
Check if it is safe to call GetA method.
const TInt & GetInt(void) const
Get the variant data.
const TGraph & GetGraph(void) const
Get the Graph member data.
bool IsInt(void) const
Check if variant Int is selected.
const TValues & GetValues(void) const
Get the Values member data.
TB GetB(void) const
Get the B member data.
const TByte & GetByte(void) const
Get the variant data.
bool CanGetLoc(void) const
Check if it is safe to call GetLoc method.
const TReal & GetReal(void) const
Get the variant data.
bool IsReal(void) const
Check if variant Real is selected.
const TValues & GetValues(void) const
Get the Values member data.
bool CanGetGraph(void) const
Check if it is safe to call GetGraph method.
bool IsByte(void) const
Check if variant Byte is selected.
bool CanGetValues(void) const
Check if it is safe to call GetValues method.
const TValues & GetValues(void) const
Get the Values member data.
bool CanGetB(void) const
Check if it is safe to call GetB method.
const TLoc & GetLoc(void) const
Get the Loc member data.
TNumval GetNumval(void) const
Get the Numval member data.
TA GetA(void) const
Get the A member data.
TComp GetComp(void) const
Get the Comp member data.
const Tdata & Get(void) const
Get the member data.
const TGraph & GetGraph(void) const
Get the variant data.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool CanGetDesc(void) const
Check if it is safe to call GetDesc method.
const TSeq_table & GetSeq_table(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const GenericPointer< typename T::ValueType > T2 value
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4