Beispiel #1
0
def upload_file():
	if request.method == 'POST':
		if 'files[]' not in request.files:
			flash('No file part')
			return redirect(request.url)
		files = request.files.getlist('files[]')
		whichtorun_list = request.form.getlist('whichToRun')
		print(whichtorun_list)
		global genome_ref
		genome_ref = request.form["genome"]
		print(genome_ref)
		if genome_ref ==  "GRCm37":
			genInstall.install('GRCm37', rsync=False, bash=True)
		if genome_ref ==  "GRCm38.p6":
			genInstall.install('GRCm38.p6', rsync=False, bash=True)
		if genome_ref ==  "Rnor_6.0":
			genInstall.install('Rnor_6.0', rsync=False, bash=True)

		if "runMutationalPatterns" in whichtorun_list:
			global mutationalPattern
			mutationalPattern = "TRUE"   
		if "runSigflow" in whichtorun_list   :
			global sigflow
			sigflow = "TRUE"
		if "runSigfit" in whichtorun_list :
			global sigfit
			sigfit = "TRUE"
		if "runDeconstructSigs" in whichtorun_list :
			global deconstructSigs
			deconstructSigs = "TRUE"   
		for file in files:
			if file and allowed_file(file.filename):
				filename = secure_filename(file.filename)
				file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
				print(filename)
		# time.sleep(10) 
		print("files succcessfully uploaded ")
		return redirect('/upload')
from SigProfilerMatrixGenerator import install as genInstall
genInstall.install('GRCh37', rsync=False, bash=True)
Beispiel #3
0
import argparse
from SigProfilerMatrixGenerator import install as genInstall


def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument("-r",
                        "--reference",
                        dest="ref",
                        default="GRCh37",
                        help="The name of the reference to install",
                        type=str)

    return parser.parse_args()


if __name__ == "__main__":

    args = parse_args()
    genInstall.install(args.ref, rsync=False, bash=True)
Beispiel #4
0
matrices = matGen.SigProfilerMatrixGeneratorFunc(project, genome, vcfFiles, exome=True, bed_file=None, chrom_based=False, plot=True, tsb_stat=True, seqInfo=True)
"""

#sample = snakemake.wildcards["sample"]
#genome_version = snakemake.params["genome_version"]
#out_dir = snakemake.params["out_dir"]
#bed = snakemake.input["bed"]

sample = "SJCBF"
genome_version = "GRCh37"
out_dir = ".tests/"
bed = None

from SigProfilerMatrixGenerator import install as genInstall

genInstall.install(genome_version, rsync=False, bash=True)

from SigProfilerMatrixGenerator.scripts import SigProfilerMatrixGeneratorFunc as matGen

matrices = matGen.SigProfilerMatrixGeneratorFunc(sample,
                                                 genome_version,
                                                 out_dir,
                                                 plot=True,
                                                 exome=True,
                                                 bed_file=bed,
                                                 chrom_based=False,
                                                 tsb_stat=False,
                                                 seqInfo=False,
                                                 cushion=100)

matrix_path = out_dir + "output/SBS/{sample}.SBS96.exome".format(sample=sample)
        if output_dir == None:
            output_dir = "/app/input_vcf_dir"

        if genome_ref == None:
            genome_ref = "GRCh37"

        if genome_ref == "GRCh37":
            # genInstall.install('GRCh37', rsync=False, bash=True)
            genome_ref = "GRCh37"

        if genome_ref == "GRCh38":
            # genInstall.install('GRCh38', rsync=False, bash=True)
            genome_ref = "GRCh38"

        if genome_ref == "GRCm37":
            genInstall.install('GRCm37', rsync=False, bash=True)
            genome_ref = "GRCm37"

        if genome_ref == "GRCm38.p6":
            genInstall.install('GRCm38.p6', rsync=False, bash=True)
            genome_ref = "GRCm38.p6"

        if genome_ref == "Rnor_6.0":
            genInstall.install('Rnor_6.0', rsync=False, bash=True)
            genome_ref = "Rnor_6.0"

        if runMutationalPatterns == False:
            runMutationalPatterns = "TRUE"

        if runMutationalPatterns == True:
            runMutationalPatterns = "FALSE"
Beispiel #6
0
def init(genome_build: GenomeBuild) -> None:
    install(str(genome_build))