Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
popins4snake
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
FONDA_A6
popins4snake
Commits
8ca524d9
Commit
8ca524d9
authored
3 years ago
by
Kedi Cao
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-find-locations-io' into 'main'
add IO of non-ref alignment file name See merge request
!6
parents
b740c065
21a8baad
Branches
Branches containing commit
1 merge request
!6
add IO of non-ref alignment file name
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
src/argument_parsing.h
+21
-9
21 additions, 9 deletions
src/argument_parsing.h
src/popins_find_locations.h
+1
-1
1 addition, 1 deletion
src/popins_find_locations.h
with
23 additions
and
11 deletions
Makefile
+
1
−
1
View file @
8ca524d9
...
@@ -18,7 +18,7 @@ TOOLS=-DSAMTOOLS=\"$(SAMTOOLS)\" -DBWA=\"$(BWA)\" -DSICKLE=\"$(SICKLE)\" -DVELVE
...
@@ -18,7 +18,7 @@ TOOLS=-DSAMTOOLS=\"$(SAMTOOLS)\" -DBWA=\"$(BWA)\" -DSICKLE=\"$(SICKLE)\" -DVELVE
# Date and version number from git
# Date and version number from git
DATE
:=
on
$(
shell git log
--pretty
=
format:
"%cd"
--date
=
iso |
cut
-f
1,2
-d
" "
|
head
-n
1
)
DATE
:=
on
$(
shell git log
--pretty
=
format:
"%cd"
--date
=
iso |
cut
-f
1,2
-d
" "
|
head
-n
1
)
VERSION
:=
0.0.
4
-snake-
$(
shell git log
--pretty
=
format:
"%h"
--date
=
iso |
head
-n
1
)
VERSION
:=
0.0.
6
-snake-
$(
shell git log
--pretty
=
format:
"%h"
--date
=
iso |
head
-n
1
)
CXXFLAGS
+=
-DDATE
=
\"
"
$(
DATE
)
"
\"
-DVERSION
=
\"
"
$(
VERSION
)
"
\"
CXXFLAGS
+=
-DDATE
=
\"
"
$(
DATE
)
"
\"
-DVERSION
=
\"
"
$(
VERSION
)
"
\"
# Compiler flags
# Compiler flags
...
...
This diff is collapsed.
Click to expand it.
src/argument_parsing.h
+
21
−
9
View file @
8ca524d9
...
@@ -243,6 +243,7 @@ struct FindLocationsOptions {
...
@@ -243,6 +243,7 @@ struct FindLocationsOptions {
CharString
prefix
;
CharString
prefix
;
CharString
sampleID
;
CharString
sampleID
;
CharString
referenceFile
;
CharString
referenceFile
;
CharString
non_ref_bam
;
int
maxInsertSize
;
int
maxInsertSize
;
bool
deleteNonRefNew
;
bool
deleteNonRefNew
;
...
@@ -251,6 +252,7 @@ struct FindLocationsOptions {
...
@@ -251,6 +252,7 @@ struct FindLocationsOptions {
prefix
(
"."
),
prefix
(
"."
),
sampleID
(
""
),
sampleID
(
""
),
referenceFile
(
"genome.fa"
),
referenceFile
(
"genome.fa"
),
non_ref_bam
(
"non_ref.bam"
),
maxInsertSize
(
800
),
maxInsertSize
(
800
),
deleteNonRefNew
(
false
)
deleteNonRefNew
(
false
)
{}
{}
...
@@ -568,6 +570,8 @@ bool getOptionValues(FindLocationsOptions &options, seqan::ArgumentParser &parse
...
@@ -568,6 +570,8 @@ bool getOptionValues(FindLocationsOptions &options, seqan::ArgumentParser &parse
getOptionValue
(
options
.
prefix
,
parser
,
"prefix"
);
getOptionValue
(
options
.
prefix
,
parser
,
"prefix"
);
if
(
isSet
(
parser
,
"reference"
))
if
(
isSet
(
parser
,
"reference"
))
getOptionValue
(
options
.
referenceFile
,
parser
,
"reference"
);
getOptionValue
(
options
.
referenceFile
,
parser
,
"reference"
);
if
(
isSet
(
parser
,
"non-ref"
))
getOptionValue
(
options
.
non_ref_bam
,
parser
,
"non-ref"
);
if
(
isSet
(
parser
,
"maxInsertSize"
))
if
(
isSet
(
parser
,
"maxInsertSize"
))
getOptionValue
(
options
.
maxInsertSize
,
parser
,
"maxInsertSize"
);
getOptionValue
(
options
.
maxInsertSize
,
parser
,
"maxInsertSize"
);
if
(
isSet
(
parser
,
"delNonRefNew"
))
if
(
isSet
(
parser
,
"delNonRefNew"
))
...
@@ -1123,6 +1127,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
...
@@ -1123,6 +1127,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
addSection
(
parser
,
"Input/output options"
);
addSection
(
parser
,
"Input/output options"
);
addOption
(
parser
,
ArgParseOption
(
"p"
,
"prefix"
,
"Path to the sample directories."
,
ArgParseArgument
::
STRING
,
"PATH"
));
addOption
(
parser
,
ArgParseOption
(
"p"
,
"prefix"
,
"Path to the sample directories."
,
ArgParseArgument
::
STRING
,
"PATH"
));
addOption
(
parser
,
ArgParseOption
(
"r"
,
"reference"
,
"Name of reference genome file."
,
ArgParseArgument
::
INPUT_FILE
,
"FASTA_FILE"
));
addOption
(
parser
,
ArgParseOption
(
"r"
,
"reference"
,
"Name of reference genome file."
,
ArgParseArgument
::
INPUT_FILE
,
"FASTA_FILE"
));
addOption
(
parser
,
ArgParseOption
(
"n"
,
"non-ref"
,
"Non-reference reads alignment file name."
,
ArgParseArgument
::
INPUT_FILE
,
"BAM FILE"
));
addSection
(
parser
,
"Algorithm options"
);
addSection
(
parser
,
"Algorithm options"
);
addOption
(
parser
,
ArgParseOption
(
"e"
,
"maxInsertSize"
,
"The maximum expected insert size of the read pairs."
,
ArgParseArgument
::
INTEGER
,
"INT"
));
addOption
(
parser
,
ArgParseOption
(
"e"
,
"maxInsertSize"
,
"The maximum expected insert size of the read pairs."
,
ArgParseArgument
::
INTEGER
,
"INT"
));
...
@@ -1134,6 +1139,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
...
@@ -1134,6 +1139,7 @@ void setupParser(seqan::ArgumentParser &parser, FindLocationsOptions &options){
// Set default values.
// Set default values.
setDefaultValue
(
parser
,
"prefix"
,
"
\'
.
\'
"
);
setDefaultValue
(
parser
,
"prefix"
,
"
\'
.
\'
"
);
setDefaultValue
(
parser
,
"reference"
,
options
.
referenceFile
);
setDefaultValue
(
parser
,
"reference"
,
options
.
referenceFile
);
setDefaultValue
(
parser
,
"non-ref"
,
options
.
non_ref_bam
);
setDefaultValue
(
parser
,
"maxInsertSize"
,
options
.
maxInsertSize
);
setDefaultValue
(
parser
,
"maxInsertSize"
,
options
.
maxInsertSize
);
setDefaultValue
(
parser
,
"delNonRefNew"
,
"false"
);
setDefaultValue
(
parser
,
"delNonRefNew"
,
"false"
);
...
@@ -1578,6 +1584,11 @@ ArgumentParser::ParseResult checkInput(FindLocationsOptions &options){
...
@@ -1578,6 +1584,11 @@ ArgumentParser::ParseResult checkInput(FindLocationsOptions &options){
res
=
ArgumentParser
::
PARSE_ERROR
;
res
=
ArgumentParser
::
PARSE_ERROR
;
}
}
if
(
!
exists
(
options
.
non_ref_bam
)){
std
::
cerr
<<
"ERROR: Non-reference reads input file
\'
"
<<
options
.
non_ref_bam
<<
"
\'
does not exist."
<<
std
::
endl
;
res
=
ArgumentParser
::
PARSE_ERROR
;
}
return
res
;
return
res
;
}
}
...
@@ -1758,15 +1769,16 @@ void printMultikOptions(const MultikOptions &options){
...
@@ -1758,15 +1769,16 @@ void printMultikOptions(const MultikOptions &options){
void
printFindLocationsOptions
(
const
FindLocationsOptions
&
options
){
void
printFindLocationsOptions
(
const
FindLocationsOptions
&
options
){
cout
<<
"========================================================="
<<
endl
;
cout
<<
"=========================================================="
<<
endl
;
cout
<<
"popins version : "
<<
VERSION
<<
endl
;
cout
<<
"popins version : "
<<
VERSION
<<
endl
;
cout
<<
"PARAMETER ======== : VALUE =============================="
<<
endl
;
cout
<<
"PARAMETER ========= : VALUE =============================="
<<
endl
;
cout
<<
"prefix : "
<<
options
.
prefix
<<
endl
;
cout
<<
"prefix : "
<<
options
.
prefix
<<
endl
;
cout
<<
"sample ID : "
<<
options
.
sampleID
<<
endl
;
cout
<<
"sample ID : "
<<
options
.
sampleID
<<
endl
;
cout
<<
"reference file : "
<<
options
.
referenceFile
<<
endl
;
cout
<<
"reference file : "
<<
options
.
referenceFile
<<
endl
;
cout
<<
"max insert size : "
<<
options
.
maxInsertSize
<<
endl
;
cout
<<
"non-reference reads : "
<<
options
.
non_ref_bam
<<
endl
;
cout
<<
"delete non_ref_new : "
<<
options
.
deleteNonRefNew
<<
endl
;
cout
<<
"max insert size : "
<<
options
.
maxInsertSize
<<
endl
;
cout
<<
"========================================================="
<<
endl
;
cout
<<
"delete non_ref_new : "
<<
options
.
deleteNonRefNew
<<
endl
;
cout
<<
"=========================================================="
<<
endl
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/popins_find_locations.h
+
1
−
1
View file @
8ca524d9
...
@@ -141,7 +141,7 @@ int popins_find_locations(int argc, char const ** argv){
...
@@ -141,7 +141,7 @@ int popins_find_locations(int argc, char const ** argv){
//CharString fastqFirst = getFileName(workingDirectory, "paired.1.fastq");
//CharString fastqFirst = getFileName(workingDirectory, "paired.1.fastq");
//CharString fastqSecond = getFileName(workingDirectory, "paired.2.fastq");
//CharString fastqSecond = getFileName(workingDirectory, "paired.2.fastq");
//CharString fastqSingle = getFileName(workingDirectory, "single.fastq");
//CharString fastqSingle = getFileName(workingDirectory, "single.fastq");
CharString
nonRefBam
=
getFileName
(
workingDirectory
,
"
non_ref
.
bam
"
);
CharString
nonRefBam
=
getFileName
(
workingDirectory
,
options
.
non_ref
_
bam
);
CharString
nonRefNew
=
getFileName
(
workingDirectory
,
"non_ref_new.bam"
);
CharString
nonRefNew
=
getFileName
(
workingDirectory
,
"non_ref_new.bam"
);
CharString
locationsFile
=
getFileName
(
workingDirectory
,
"locations.txt"
);
CharString
locationsFile
=
getFileName
(
workingDirectory
,
"locations.txt"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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