Skip to content

Commit

Permalink
v2.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
YuSugihara committed Oct 5, 2024
1 parent a568473 commit a907bd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 87 deletions.
3 changes: 0 additions & 3 deletions mutmap/mutmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ def mutplot(self):

if self.args.snpEff is not None:
cmd = cmd + ' -e {}'.format(self.args.snpEff)

if self.args.species is not None:
cmd = cmd + ' --species {}'.format(self.args.species)

cmd = clean_cmd(cmd)
p = sbp.Popen(cmd,
Expand Down
36 changes: 0 additions & 36 deletions mutmap/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,6 @@ def mutmap_options(self):
'is suited for BWA. [50]'),
metavar='')

parser.add_argument('--species',
action='store',
choices=['Arabidopsis',
'Cucumber',
'Maize',
'Rapeseed',
'Rice',
'Tobacco',
'Tomato',
'Wheat',
'Yeast'],
help=('Consider multiple test correction derived by\n'
'Huang et al. (2019). Please spesify a species name.\n'
'With this option. QTL-seq produces a theoretical threshold.\n'
'Currently, Arabidopsis, Cucumber, Maize, Rapeseed,\n'
'Rice, Tobacco, Tomato, Wheat, and Yeast are supported.'),
metavar='')

# set version
parser.add_argument('-v',
'--version',
Expand Down Expand Up @@ -339,24 +321,6 @@ def mutplot_options(self):
default=False,
help='Output IGV format file to check results on IGV.')

parser.add_argument('--species',
action='store',
choices=['Arabidopsis',
'Cucumber',
'Maize',
'Rapeseed',
'Rice',
'Tobacco',
'Tomato',
'Wheat',
'Yeast'],
help=('Consider multiple test correction derived by\n'
'Huang et al. (2019). Please spesify a species name.\n'
'With this option. MutMap produces a theoretical threshold.\n'
'Currently, Arabidopsis, Cucumber, Maize, Rapeseed,\n'
'Rice, Tobacco, Tomato, Wheat, and Yeast are supported.'),
metavar='')

parser.add_argument('--indel',
action='store_true',
default=False,
Expand Down
51 changes: 3 additions & 48 deletions mutmap/vcf2index.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import os
import re
import sys
Expand All @@ -16,7 +17,6 @@ def __init__(self, args):
self.out = args.out
self.vcf = args.vcf
self.snpEff = args.snpEff
self.species = args.species
self.N_bulk = args.N_bulk
self.N_replicates = args.N_rep
self.min_SNPindex = args.min_SNPindex
Expand All @@ -25,53 +25,8 @@ def __init__(self, args):
if self.snpEff is not None:
self.ANN_re = re.compile(';ANN=(.*);*')

if self.species is None:
self.p99_index = int(0.99*self.N_replicates) - 1
self.p95_index = int(0.95*self.N_replicates) - 1
else:
k = self.correct_threshold()
corr_p99 = 0.01/k
corr_p95 = 0.05/k
self.p99_index = int((1 - corr_p99)*self.N_replicates) - 1
self.p95_index = int((1 - corr_p95)*self.N_replicates) - 1

if int(corr_p99*self.N_replicates) - 1 < 0:
print(('!!WARNING!! Number of replicates for simulation is not '
'enough to consider multiple testing correction. '
'Therefore, the highest SNP-index and the second highest '
'SNP-index were selected for p99 and p95, respectively.'),
file=sys.stderr)

self.p99_index = self.N_replicates - 1
self.p95_index = self.N_replicates - 2

def correct_threshold(self):
l = 8.4

if self.species == 'Arabidopsis':
k = 5 + 600/l
elif self.species == 'Cucumber':
k = 7 + 1390/l
elif self.species == 'Maize':
k = 10 + 2060/l
elif self.species == 'Rapeseed':
k = 18 + 2520/l
elif self.species == 'Rice':
k = 12 + 1530/l
elif self.species == 'Tobacco':
k = 12 + 3270/l
elif self.species == 'Tomato':
k = 12 + 1470/l
elif self.species == 'Wheat':
k = 21 + 3140/l
elif self.species == 'Yeast':
k = 16 + 4900/l

else:
print('You specified not supported species.', file=sys.stderr)
sys.exit(1)

return k
self.p99_index = int(0.99*self.N_replicates) - 1
self.p95_index = int(0.95*self.N_replicates) - 1

def get_field(self):
root, ext = os.path.splitext(self.vcf)
Expand Down

0 comments on commit a907bd3

Please sign in to comment.