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
7bea8541
Commit
7bea8541
authored
10 years ago
by
nkindlon
Browse files
Options
Downloads
Patches
Plain Diff
fixing merge errors, again.
parent
653dc114
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utils/NewChromsweep/NewChromsweep.cpp
+1
-50
1 addition, 50 deletions
src/utils/NewChromsweep/NewChromsweep.cpp
src/utils/NewChromsweep/NewChromsweep.h
+0
-5
0 additions, 5 deletions
src/utils/NewChromsweep/NewChromsweep.h
with
1 addition
and
55 deletions
src/utils/NewChromsweep/NewChromsweep.cpp
+
1
−
50
View file @
7bea8541
...
...
@@ -91,11 +91,7 @@ NewChromSweep::~NewChromSweep(void) {
}
<<<<<<<
HEAD
void
NewChromSweep
::
scanCache
(
int
dbIdx
,
RecordKeyVector
&
retList
)
{
=======
void
NewChromSweep
::
scanCache
(
int
dbIdx
)
{
>>>>>>>
57
ed945c121a6e7d1ea803f19bca10c25b5eff4d
recListIterType
cacheIter
=
_caches
[
dbIdx
].
begin
();
while
(
cacheIter
!=
_caches
[
dbIdx
].
end
())
{
...
...
@@ -119,7 +115,6 @@ void NewChromSweep::clearCache(int dbIdx)
recListType
&
cache
=
_caches
[
dbIdx
];
for
(
recListIterType
iter
=
cache
.
begin
();
iter
!=
cache
.
end
();
iter
=
cache
.
next
())
{
_dbFRMs
[
dbIdx
]
->
deleteRecord
(
iter
->
value
());
<<<<<<<
HEAD
}
cache
.
clear
();
}
...
...
@@ -154,41 +149,6 @@ void NewChromSweep::masterScan(RecordKeyVector &retList) {
}
bool
NewChromSweep
::
chromChange
(
int
dbIdx
,
RecordKeyVector
&
retList
)
=======
}
cache
.
clear
();
}
void
NewChromSweep
::
masterScan
()
{
for
(
int
i
=
0
;
i
<
_numDBs
;
i
++
)
{
if
(
dbFinished
(
i
)
||
chromChange
(
i
))
{
continue
;
}
else
{
// scan the database cache for hits
scanCache
(
i
);
//skip if we hit the end of the DB
// advance the db until we are ahead of the query. update hits and cache as necessary
while
(
_currDbRecs
[
i
]
!=
NULL
&&
_currQueryRec
->
sameChrom
(
_currDbRecs
[
i
])
&&
!
(
_currDbRecs
[
i
]
->
after
(
_currQueryRec
)))
{
if
(
intersects
(
_currQueryRec
,
_currDbRecs
[
i
]))
{
_hits
.
push_back
(
_currDbRecs
[
i
]);
}
if
(
_currQueryRec
->
after
(
_currDbRecs
[
i
]))
{
_dbFRMs
[
i
]
->
deleteRecord
(
_currDbRecs
[
i
]);
_currDbRecs
[
i
]
=
NULL
;
}
else
{
_caches
[
i
].
push_back
(
_currDbRecs
[
i
]);
_currDbRecs
[
i
]
=
NULL
;
}
nextRecord
(
false
,
i
);
}
}
}
}
bool
NewChromSweep
::
chromChange
(
int
dbIdx
)
{
// the files are on the same chrom
if
(
_currDbRecs
[
dbIdx
]
==
NULL
||
_currQueryRec
->
sameChrom
(
_currDbRecs
[
dbIdx
]))
{
...
...
@@ -217,6 +177,7 @@ bool NewChromSweep::chromChange(int dbIdx)
return
true
;
}
bool
NewChromSweep
::
next
(
RecordKeyVector
&
retList
)
{
retList
.
clearVector
();
if
(
_currQueryRec
!=
NULL
)
{
...
...
@@ -225,19 +186,10 @@ bool NewChromSweep::next(RecordKeyVector &retList) {
if
(
!
nextRecord
(
true
))
return
false
;
// query EOF hit
// QuickString outBuf;
// if (_currQueryRec->getStartPosStr() == "30758914") {
// return false;
// }
// else {
// _currQueryRec->print(outBuf);
// cerr << outBuf << endl;
// }
if
(
allCurrDBrecsNull
()
&&
allCachesEmpty
()
&&
!
_runToQueryEnd
)
{
return
false
;
}
// _hits.clear();
_currChromName
=
_currQueryRec
->
getChrName
();
masterScan
(
retList
);
...
...
@@ -247,7 +199,6 @@ bool NewChromSweep::next(RecordKeyVector &retList) {
}
retList
.
setKey
(
_currQueryRec
);
// retList.setListNoCopy(_hits);
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
src/utils/NewChromsweep/NewChromsweep.h
+
0
−
5
View file @
7bea8541
...
...
@@ -91,11 +91,6 @@ private:
void
clearCache
(
int
dbIdx
);
bool
chromChange
(
int
dbIdx
,
RecordKeyVector
&
retList
);
bool
nextRecord
(
bool
query
,
int
dbIdx
=
-
1
);
//true fetches next query record, false fetches next db record.
void
scanCache
(
int
dbIdx
);
void
clearCache
(
int
dbIdx
);
bool
chromChange
(
int
dbIdx
);
bool
dbFinished
(
int
dbIdx
);
bool
intersects
(
const
Record
*
rec1
,
const
Record
*
rec2
)
const
;
...
...
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