Ejemplo n.º 1
0
 def __init__(self, args):
     unixpath.checkFile(args.i)
     unixpath.checkFile(args.v)
     self.infile = args.i
     self.outfile = ""
     self.variants = []
     self.xlsx = args.v
     self.__readVariants__(args)
Ejemplo n.º 2
0
 def __init__(self, args):
     unixpath.checkFile(args.d)
     self.indir = unixpath.checkDir(args.p)
     self.infile = args.d
     self.outfile = args.o
     self.species = {}
     self.__readDeathBooks__()
     self.__readPopulationFiles__()
     self.__write__()
Ejemplo n.º 3
0
 def __init__(self, args):
     unixpath.checkFile(args.i)
     self.comments = set()
     self.diag = {}
     self.header = {}
     self.infile = args.i
     self.outfile = args.o
     self.__readInfile__()
     self.__writeFile__()
Ejemplo n.º 4
0
 def __init__(self, args):
     for i in [args.i, args.t, args.d]:
         unixpath.checkFile(i)
     self.infile = args.d
     self.outfile = os.path.join(
         os.path.split(self.infile)[0], "madsenMergedDiagnoses.csv")
     self.refs = {}
     self.taxa = {}
     self.__setRefs__(args.i)
     self.__setTaxa__(args.t)
Ejemplo n.º 5
0
 def __init__(self, args):
     self.infile = args.i
     self.taxafile = args.t
     self.outfile = args.o
     self.delete = set()
     self.new = {}
     self.updated = set()
     for i in [self.infile, self.taxafile]:
         unixpath.checkFile(i)
     self.__setTaxa__()
Ejemplo n.º 6
0
 def __init__(self, args):
     for i in [args.a, args.i]:
         unixpath.checkFile(i)
     self.accounts = {}
     self.accountfile = args.a
     self.counts = {}
     self.infile = args.i
     self.outfile = args.o
     self.__setAccounts__()
     self.__countRecords__()
     self.__write__()
Ejemplo n.º 7
0
 def __init__(self, args):
     for i in [args.i, args.n]:
         unixpath.checkFile(i)
     self.min = 50
     self.outfile = args.o
     self.records = {}
     self.rows = []
     print()
     self.__setCounts__(args.i, False)
     self.__setCounts__(args.n, True)
     self.__filter__()
     self.__write__()
Ejemplo n.º 8
0
def main():
	start = datetime.now()
	parser = ArgumentParser("This script will make a histogram of species \
occurances for each species in a given database.")
	parser.add_argument("--min", type = int, default = 50,
 help = "The minimum number of records required for each species (default = 50).")
	parser.add_argument("infile", help = "Path to input file. Output svg will be written in same directory.")
	args = parser.parse_args()
	checkFile(args.infile)
	outfile = args.infile[:args.infile.rfind(".")] + ".svg"
	title = getTitle(args.infile, args.min)
	freq = getSpeciesCounts(args.infile, args.min)
	speciesHist(outfile, freq, title, args.min)
	printRuntime(start)
Ejemplo n.º 9
0
 def __init__(self, args):
     for i in [args.i, args.t]:
         unixpath.checkFile(i)
     self.infile = args.i
     self.outfile = os.path.join(
         os.path.split(self.infile)[0],
         "compressed_literature_compilation.csv")
     self.header = {}
     self.records = {}
     self.taxa = {}
     self.names = []
     self.__setTaxa__(args.t)
     self.__readFile__()
     self.__writeRecords__()
Ejemplo n.º 10
0
	def __init__(self, args):
		unixpath.checkFile(args.a)
		unixpath.checkFile(args.n)
		pyplot.style.use("seaborn-deep")
		self.bins = [20, 30, 40, 50, 60, 70, 80, 90, 100, 110]
		self.col = "RecordsWithDenominators"
		self.label = ["all records", "necropsies"]
		self.legend = "upper right"
		self.max = 100
		self.min = 20
		self.outfile = os.path.join(os.path.split(args.a)[0], "speciesTotals.svg")
		print()
		self.all = self.__setCounts__(args.a)
		self.necropsy = self.__setCounts__(args.n)