-
Notifications
You must be signed in to change notification settings - Fork 10
Replacing impute2 with Beagle; Support for hg19 and hg38 reference genomes #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 43 commits
ea53bd3
3836328
bba909d
e0d4a50
9586a6a
3109026
5e86bfa
3b3d7fb
68f24bc
4ba122f
1dd2cf7
530ba17
78e1612
1888521
368a3c5
1a8069a
de2b5a0
a96db03
eff8785
e49047a
9600f4b
27451e6
c8a953f
0a6de5a
fd79e51
c9aa6a0
2160ea7
f880d0a
f11ed17
9a41797
1061eeb
13bdfe2
cfec6c9
944304d
72f796b
232cbd0
94b4eb4
081e236
524037d
14954cd
a2e30c1
df9e662
778079b
118f4c6
87f6439
209a232
5e7fdbc
e8a7fc7
5004ae1
a8b2f55
19b3100
5c4ad09
3d16416
346e68a
b139c9a
9b86c36
52c6c5a
7b0d1ff
f52f086
e6a5845
30555e1
09bd58f
fe1b82b
d5706f9
232a81d
e3fc99f
1229a24
eb26938
e783d7e
6549fe0
779d5b0
fc26eb6
8655540
8a29539
8ffd230
2d0ec65
8eda5e9
ab85dc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ build/ | |
| *.swp | ||
| *.DS_Store | ||
| #.+ | ||
| hg19_GRCh37_1000genomes | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| 5.0 | ||
| 6.0 | ||
| 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #chromosome start end rec | ||
| 2 95574244 96074272 2906 | ||
| 2 131432422 132252426 2910 | ||
| 11 48878445 50210921 2909 | ||
| 14 21896742 22531023 159 | ||
| 15 24084780 24584944 2910 | ||
| 18 14119958 14910027 2910 | ||
| 19 42705844 43295853 2910 | ||
| 23 90094938 90885199 2909 | ||
| 23 92274954 93125000 2862 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright (c) 2017 The ACEseq workflow developers. | ||
| # Distributed under the MIT License (license terms are at https://www.github.com/eilslabs/ACEseqWorkflow/LICENSE.txt). | ||
|
|
||
| dieWith() { | ||
| local ec="${2:-$?}" | ||
| local msg="${1:?No error message}" | ||
|
NagaComBio marked this conversation as resolved.
Outdated
|
||
| echo "$msg: exit code $ec" >> /dev/stderr | ||
| exit "$ec" | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||||||||
| #!/usr/bin/python | ||||||||||||
|
|
||||||||||||
| import argparse | ||||||||||||
|
|
||||||||||||
| def is_comment_line(line): | ||||||||||||
| return line.startswith("#") | ||||||||||||
|
|
||||||||||||
| parser = argparse.ArgumentParser() | ||||||||||||
| parser.add_argument('--in_file', help='Input .vcf file') | ||||||||||||
| parser.add_argument('--out_file', help='Out .vcf file') | ||||||||||||
| args = parser.parse_args() | ||||||||||||
|
|
||||||||||||
| vcf_infile = open( args.in_file, "r" ) | ||||||||||||
| outfile = open( args.out_file, "w" ) | ||||||||||||
|
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using the - vcf_infile = open( args.in_file, "r" )
- outfile = open( args.out_file, "w" )
+ with open(args.in_file, "r") as vcf_infile, open(args.out_file, "w") as outfile:Commitable suggestion
Suggested change
|
||||||||||||
|
|
||||||||||||
| for vcf_line in vcf_infile: | ||||||||||||
|
|
||||||||||||
| if is_comment_line(vcf_line): | ||||||||||||
| if vcf_line.startswith("#CHROM"): | ||||||||||||
| vcf_line = vcf_line.rstrip().split("\t") | ||||||||||||
| vcf_line.append('sample0') | ||||||||||||
|
vinjana marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "fake" sample name 'sample0' is hardcoded. Consider making this configurable through a command-line argument for flexibility. - parser.add_argument('--out_file', help='Out .vcf file')
+ parser.add_argument('--out_file', help='Out .vcf file')
+ parser.add_argument('--sample_name', default='sample0', help='Sample name to be added')
...
- vcf_line.append('sample0')
+ vcf_line.append(args.sample_name)Commitable suggestion
Suggested change
|
||||||||||||
| vcf_line = "\t".join( vcf_line )+"\n" | ||||||||||||
|
|
||||||||||||
| else: | ||||||||||||
| vcf_line = vcf_line.rstrip().split("\t") | ||||||||||||
| vcf_line.append(vcf_line[9]) | ||||||||||||
| vcf_line = "\t".join( vcf_line )+"\n" | ||||||||||||
|
|
||||||||||||
| outfile.write( vcf_line ) | ||||||||||||
Uh oh!
There was an error while loading. Please reload this page.