Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mosaicatcher Update
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Thomas Weber
Mosaicatcher Update
Commits
0044adb9
Commit
0044adb9
authored
7 years ago
by
Sascha Meiers
Browse files
Options
Downloads
Patches
Plain Diff
Fix for prev. commit
parent
75da0fbe
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
Snakefile
+5
-1
5 additions, 1 deletion
Snakefile
utils/helper.convert_strandphaser_output.R
+5
-4
5 additions, 4 deletions
utils/helper.convert_strandphaser_output.R
with
10 additions
and
5 deletions
Snakefile
+
5
−
1
View file @
0044adb9
...
...
@@ -178,10 +178,14 @@ rule convert_strandphaser_input:
"utils/helper.convert_strandphaser_input.R"
# Dummy rule - this will be replaced by strand-phaser
##
# Dummy rule - this will be replaced by strand-phaser
rule run_strandphaser:
input:
"phased_haps.txt"
output:
"strand_states/" + config["sample"] + ".strandphaser_output.txt"
shell:
"cp {input} {output}"
rule convert_strandphaser_output:
input:
...
...
This diff is collapsed.
Click to expand it.
utils/helper.convert_strandphaser_output.R
+
5
−
4
View file @
0044adb9
library
(
data.table
);
library
(
assertthat
)
d
=
fread
(
snakemake
@
input
[[
"phased_states"
]])
e
=
fread
(
snakemake
@
input
[[
"info"
]])
g
=
fread
(
snakemake
@
in
t
put
[[
"initial_states"
]])
e
=
fread
(
snakemake
@
input
[[
"phased_states"
]])
d
=
fread
(
snakemake
@
input
[[
"info"
]])
g
=
fread
(
snakemake
@
input
[[
"initial_states"
]])
d
$
bam
=
basename
(
d
$
bam
);
...
...
@@ -14,10 +14,11 @@ f = merge(d, e, by = "bam")[, .(chrom,start,end,sample,cell,class)]
# Note that there is still a bug in Venla's strand state detection.
g
=
merge
(
g
,
f
,
by
=
c
(
"chrom"
,
"start"
,
"end"
,
"sample"
,
"cell"
),
all.x
=
T
)
# Overwrite with David's phased strand state if available!
g
=
g
[,
class
:=
ifelse
(
!
is.na
(
class.y
),
class.y
,
class.x
)][]
g
$
class.x
=
NULL
g
$
class.y
=
NULL
g
=
g
[,
.
(
chrom
,
start
,
end
,
sample
,
cell
,
class
)]
write.table
(
g
,
file
=
snakemake
@
output
[[
1
]],
quote
=
F
,
row.names
=
F
,
col.names
=
F
,
sep
=
"\t"
)
\ No newline at end of file
write.table
(
g
,
file
=
snakemake
@
output
[[
1
]],
quote
=
F
,
row.names
=
F
,
col.names
=
T
,
sep
=
"\t"
)
\ No newline at end of file
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