Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robin Erich Muench
metaSNV
Commits
cf423e71
Commit
cf423e71
authored
Mar 15, 2017
by
Robin Erich Muench
Browse files
Merge branch 'master' into 'master'
DOC Spell check comments See merge request
!6
parents
70ce9fa7
07b1c519
Changes
4
Hide whitespace changes
Inline
Side-by-side
metaSNP_filtering.py
View file @
cf423e71
...
...
@@ -25,7 +25,7 @@ def get_arguments():
parser
.
add_argument
(
"--debug"
,
action
=
"store_true"
,
help
=
argparse
.
SUPPRESS
)
parser
.
add_argument
(
"-v"
,
"--vcf"
,
action
=
"store_true"
,
help
=
argparse
.
SUPPRESS
)
#"output variants in variant call format (vcf4.2)"
# TODO: POPULA
I
TON STATISTICS
# TODO: POPULAT
I
ON STATISTICS
## Population Statistics (Fst - ):
# parser.add_argument("-f", "--fst", action="store_true")
## pNpS ratio:
...
...
@@ -51,7 +51,7 @@ def get_arguments():
##############################
def
debugging
(
taxids_of_interest
,
header_cov
):
'''Sanity
C
heck for the Dict of TaxID:Samples'''
'''Sanity
c
heck for the Dict of TaxID:Samples'''
nr_keys
=
0
taxids_of_interest
=
[]
...
...
@@ -252,10 +252,10 @@ def header_comparison(header_cov):
#################################
## FILTER II: ACQUIRE SNPs WITH SUFFICIENT OCCURENCE WITHIN SAMPLES_OF_INTERES
## FILTER II: ACQUIRE SNPs WITH SUFFICIENT OCCUR
R
ENCE WITHIN SAMPLES_OF_INTERES
T
# --SNP Conditions (Default):
# 1. Position covered by at least (5) reads
# 2. Position present in at least 50 % of the accepted samples_of_interes
# 2. Position present in at least 50 % of the accepted samples_of_interes
t
def
filter_two
(
args
,
snp_header
):
'''position wise filtering'''
...
...
@@ -440,9 +440,9 @@ if __name__ == "__main__":
if
args
.
debug
:
print_arguments
()
#=========================================
# Filtering I - Determine Taxa of Interes:
#=========================================
#=========================================
=
# Filtering I - Determine Taxa of Interes
t
:
#=========================================
=
samples_of_interest
=
relevant_taxa
(
args
)[
'SoI'
]
header_cov
=
relevant_taxa
(
args
)[
'h'
]
...
...
src/computeGenomeCoverage.py
View file @
cf423e71
import
sys
#We assume that contings are sorted within the genome, so that a contig won't show up
#randomly in the file, but together with its friends.
# We assume that contigs are sorted within the genome
cov
=
open
(
sys
.
argv
[
1
],
'r'
)
xcov
=
open
(
sys
.
argv
[
2
],
'r'
)
...
...
src/createOptimumSplit.py
View file @
cf423e71
...
...
@@ -55,7 +55,9 @@ print 'Found %d genomes again. Hope they match'%(len(percDict))
table
=
[]
#Get an approximation of how many reads hit each genome. This is as close as you will get to figuring out how long running it is going to take
# Get an approximation of how many reads hit each genome. This is as close as
# you will get to figuring out how long running it is going to take
for
k
in
genomeDict
.
keys
():
read
=
genomeDict
[
k
]
*
covDict
[
k
]
/
100
#*percDict[k]/100
table
.
append
((
k
,
read
))
...
...
src/snpCaller/call_vC.cpp
View file @
cf423e71
...
...
@@ -131,7 +131,7 @@ bool indexGenomeAndGenes(FILE* refGenome, FILE* refGenes) {
const
char
*
l
=
toksplit
(
line
,
'\t'
,
tok
,
10000
);
int
pos
=
0
;
while
(
*
l
)
{
if
(
pos
==
2
)
{
//Thi
e
is the name!
if
(
pos
==
2
)
{
//Thi
s
is the name!
if
(
name
.
compare
(
""
)
==
0
)
{
//This is the first one
name
=
tok
;
}
else
if
(
name
.
compare
(
tok
)
!=
0
)
{
//Boom, this is a new one
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment