Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bedtools2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
legacy
bedtools2
Commits
e6cab1c6
Commit
e6cab1c6
authored
11 years ago
by
arq5x
Browse files
Options
Downloads
Patches
Plain Diff
[BUG] change getField() logic in GffRecord
parent
99499249
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utils/FileRecordTools/Records/GffRecord.cpp
+37
-0
37 additions, 0 deletions
src/utils/FileRecordTools/Records/GffRecord.cpp
src/utils/FileRecordTools/Records/GffRecord.h
+2
-1
2 additions, 1 deletion
src/utils/FileRecordTools/Records/GffRecord.h
with
39 additions
and
1 deletion
src/utils/FileRecordTools/Records/GffRecord.cpp
+
37
−
0
View file @
e6cab1c6
...
@@ -120,3 +120,40 @@ void GffRecord::printNull(QuickString &outBuf) const
...
@@ -120,3 +120,40 @@ void GffRecord::printNull(QuickString &outBuf) const
}
}
}
}
const
QuickString
&
GffRecord
::
getField
(
int
fieldNum
)
const
{
if
(
fieldNum
==
9
&&
_numFields
==
9
)
{
return
_group
;
}
switch
(
fieldNum
)
{
case
1
:
return
_chrName
;
break
;
case
2
:
return
_source
;
break
;
case
3
:
return
_name
;
break
;
case
4
:
return
_startPosStr
;
break
;
case
5
:
return
_endPosStr
;
break
;
case
6
:
return
_score
;
break
;
case
7
:
return
_strand
;
break
;
case
8
:
return
_frame
;
break
;
default:
return
Bed6Interval
::
getField
(
fieldNum
);
break
;
}
}
This diff is collapsed.
Click to expand it.
src/utils/FileRecordTools/Records/GffRecord.h
+
2
−
1
View file @
e6cab1c6
...
@@ -27,9 +27,10 @@ public:
...
@@ -27,9 +27,10 @@ public:
virtual
const
QuickString
&
getSource
()
const
{
return
_source
;
}
virtual
const
QuickString
&
getSource
()
const
{
return
_source
;
}
virtual
const
QuickString
&
getFrame
()
const
{
return
_frame
;
}
virtual
const
QuickString
&
getFrame
()
const
{
return
_frame
;
}
virtual
const
QuickString
&
getGroup
()
const
{
return
_group
;
}
virtual
const
QuickString
&
getGroup
()
const
{
return
_group
;
}
virtual
const
int
getNumFields
()
const
{
return
_numFields
;
}
virtual
int
getNumFields
()
const
{
return
_numFields
;
}
virtual
void
setNumFields
(
int
val
)
{
_numFields
=
val
;
}
virtual
void
setNumFields
(
int
val
)
{
_numFields
=
val
;
}
virtual
const
QuickString
&
getField
(
int
fieldNum
)
const
;
//Note: using the assignment operator in a GffRecord can potentially be a performance hit,
//Note: using the assignment operator in a GffRecord can potentially be a performance hit,
//if the number of fields frequently differ between this object and the one being copied.
//if the number of fields frequently differ between this object and the one being copied.
const
GffRecord
&
operator
=
(
const
GffRecord
&
other
);
const
GffRecord
&
operator
=
(
const
GffRecord
&
other
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment