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
832c4de2
Commit
832c4de2
authored
13 years ago
by
Aaron
Browse files
Options
Downloads
Patches
Plain Diff
nucBed now obeys strand'
parent
7b9c84ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/nucBed/nucBed.cpp
+7
-2
7 additions, 2 deletions
src/nucBed/nucBed.cpp
src/nucBed/nucBed.h
+4
-1
4 additions, 1 deletion
src/nucBed/nucBed.h
src/nucBed/nucBedMain.cpp
+6
-1
6 additions, 1 deletion
src/nucBed/nucBedMain.cpp
with
17 additions
and
4 deletions
src/nucBed/nucBed.cpp
+
7
−
2
View file @
832c4de2
...
...
@@ -13,13 +13,15 @@
#include
"nucBed.h"
NucBed
::
NucBed
(
string
&
dbFile
,
string
&
bedFile
,
bool
printSeq
,
bool
hasPattern
,
const
string
&
pattern
)
{
NucBed
::
NucBed
(
string
&
dbFile
,
string
&
bedFile
,
bool
printSeq
,
bool
hasPattern
,
const
string
&
pattern
,
bool
forceStrand
)
{
_dbFile
=
dbFile
;
_bedFile
=
bedFile
;
_printSeq
=
printSeq
;
_hasPattern
=
hasPattern
;
_pattern
=
pattern
;
_forceStrand
=
forceStrand
;
_bed
=
new
BedFile
(
_bedFile
);
...
...
@@ -129,7 +131,10 @@ void NucBed::ProfileDNA() {
// grab the dna at this interval
int
length
=
bed
.
end
-
bed
.
start
;
// report the sequence's content
ReportDnaProfile
(
bed
,
fr
.
getSubSequence
(
bed
.
chrom
,
bed
.
start
,
length
),
length
);
string
dna
=
fr
.
getSubSequence
(
bed
.
chrom
,
bed
.
start
,
length
);
if
((
_forceStrand
==
true
)
&&
(
bed
.
strand
==
"-"
))
reverseComplement
(
dna
);
ReportDnaProfile
(
bed
,
dna
,
length
);
bed
=
nullBed
;
}
else
...
...
This diff is collapsed.
Click to expand it.
src/nucBed/nucBed.h
+
4
−
1
View file @
832c4de2
...
...
@@ -29,7 +29,9 @@ class NucBed {
public:
// constructor
NucBed
(
string
&
dbFile
,
string
&
bedFile
,
bool
printSeq
,
bool
hasPattern
,
const
string
&
pattern
);
NucBed
(
string
&
dbFile
,
string
&
bedFile
,
bool
printSeq
,
bool
hasPattern
,
const
string
&
pattern
,
bool
forceStrand
);
// destructor
~
NucBed
(
void
);
...
...
@@ -42,6 +44,7 @@ private:
bool
_printSeq
;
bool
_hasPattern
;
string
_pattern
;
bool
_forceStrand
;
// instance of a bed file class.
BedFile
*
_bed
;
...
...
This diff is collapsed.
Click to expand it.
src/nucBed/nucBedMain.cpp
+
6
−
1
View file @
832c4de2
...
...
@@ -39,6 +39,7 @@ int main(int argc, char* argv[]) {
bool
haveBed
=
false
;
bool
printSeq
=
false
;
bool
hasPattern
=
false
;
bool
forceStrand
=
false
;
// check to see if we should print out some help
if
(
argc
<=
1
)
showHelp
=
true
;
...
...
@@ -76,6 +77,9 @@ int main(int argc, char* argv[]) {
else
if
(
PARAMETER_CHECK
(
"-seq"
,
4
,
parameterLength
))
{
printSeq
=
true
;
}
else
if
(
PARAMETER_CHECK
(
"-s"
,
2
,
parameterLength
))
{
forceStrand
=
true
;
}
else
if
(
PARAMETER_CHECK
(
"-pattern"
,
8
,
parameterLength
))
{
if
((
i
+
1
)
<
argc
)
{
hasPattern
=
true
;
...
...
@@ -95,7 +99,7 @@ int main(int argc, char* argv[]) {
if
(
!
showHelp
)
{
NucBed
*
nuc
=
new
NucBed
(
fastaDbFile
,
bedFile
,
printSeq
,
hasPattern
,
pattern
);
NucBed
*
nuc
=
new
NucBed
(
fastaDbFile
,
bedFile
,
printSeq
,
hasPattern
,
pattern
,
forceStrand
);
delete
nuc
;
return
0
;
...
...
@@ -118,6 +122,7 @@ void ShowHelp(void) {
cerr
<<
"Options: "
<<
endl
;
cerr
<<
"
\t
-fi
\t
Input FASTA file"
<<
endl
<<
endl
;
cerr
<<
"
\t
-bed
\t
BED/GFF/VCF file of ranges to extract from -fi"
<<
endl
<<
endl
;
cerr
<<
"
\t
-s
\t
Profile the sequence according to strand."
<<
endl
<<
endl
;
cerr
<<
"
\t
-seq
\t
Print the extracted sequence"
<<
endl
<<
endl
;
cerr
<<
"
\t
-pattern
\t
Report the number of times a user-defined sequence is observed (case-insensitive)."
<<
endl
<<
endl
;
...
...
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