All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.maizegenetics.pangenome.smallseq.SmallSeqPaths Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package net.maizegenetics.pangenome.smallseq;

import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import net.maizegenetics.taxa.TaxaList;
import net.maizegenetics.taxa.Taxon;

import java.util.stream.Stream;

public class SmallSeqPaths {
    public static final String fastaSuffix = ".fa";
    public static final String refGenomeName = "Ref";
    public static final Multimap genomeNames = new ImmutableMultimap.Builder()
            .putAll(refGenomeName, "RefA1")
            .putAll("LineA", "LineA1")
            .putAll("LineB", "LineB1")
            //.putAll("RecAB", "")
            .build();
    
    private static final String userHome = System.getProperty("user.home").replace("\\","/");
    static final String bwaPath = userHome+"/Box Sync/MaizePHG/PHG_external_apps/bwaall/bwa";
    static final String samToolsPath = userHome+"/Box Sync/MaizePHG/PHG_external_apps/bin/samtools";
    static final String bcfToolsPath = userHome+"/Box Sync/MaizePHG/PHG_external_apps/bcftools-1.5/bcftools";
    static final String gatkPath = userHome+"/Box Sync/MaizePHG/PHG_external_apps/GenomeAnalysisTK.jar";
    static final String picardPath = userHome+"/Box Sync/MaizePHG/PHG_external_apps/picard.jar";
    static final String minimap2Path = userHome+"/Box Sync/MaizePHG/PHG_external_apps/minimap2";
    public static TaxaList taxaList = Stream.concat(genomeNames.keySet().stream(), genomeNames.values().stream())
            .filter(name -> !name.isEmpty())
            .map(Taxon::new)
            .collect(TaxaList.collect());
    public static final String refGenomeFile = refGenomeName + fastaSuffix;
    public static final String gvcfServerPath = "localhost;" + userHome + "/temp/gvcfRemote/";

    //Setting up directories
    public static String smallSeqBaseDir = userHome + "/temp/phgSmallSeq/";
    public static String smallSeqBaseRemoteGvcfDir = userHome + "/temp/gvcfRemote/"; // see remoteGvcfDirDocker and remoteGvcfDir
    public static String postgresDockerDir = smallSeqBaseDir + "postgresDocker/";
    public static String postgresDataDir = smallSeqBaseDir + "postgresData/";
    public static String baseDir = smallSeqBaseDir + "dockerBaseDir/";
    public static String baseGvcfDir = smallSeqBaseRemoteGvcfDir + "remoteUploadedGvcfs/";
    public static String baseDirDocker = "/phg/";
    public static String baseGVCFDirDocker = "/remoteGvcfs/";
    public static String inputDir = baseDir + "inputDir/";
    public static String inputDirDocker = baseDirDocker + "inputDir/";
    public static String assemblyDir = inputDir + "assemblies/";
    public static String assemblyDirDocker = inputDirDocker + "assemblies/";
    public static String assemblyServerDir = "irods:AssemblyFilePath"; // needed in asm key file
    public static String loadDBDir = inputDir + "loadDB/";
    public static String loadDBDirDocker = inputDirDocker + "loadDB/";
    public static String fastqDir = loadDBDir + "fastq/";
    public static String fastqDirDocker = loadDBDirDocker + "fastq/";
    public static String bamDir = loadDBDir + "bam/";
    public static String bamDirDocker = loadDBDirDocker + "bam/";
    public static String bamDedupDir = bamDir + "dedup/";
    public static String bamDedupDirDocker = bamDirDocker + "dedup/";
    public static String bamMapQDir = bamDir + "mapqFiltered/";
    public static String bamMapQDirDocker = bamDirDocker + "mapqFiltered/";
    public static String gvcfDir = loadDBDir + "gvcf/";
    public static String gvcfDirDocker = loadDBDirDocker + "gvcf/";
    public static String localGvcfDir = baseDir +"localDownloadedGvcfs/"; // where the downloaded  gvcfs are stored for processing
    public static String localGvcfDirDocker = baseGVCFDirDocker; // for smallSeq, it is same as where we uploaded them

    public static String refGenomeDir = inputDir + "reference/";
    public static String refGenomeDirDocker = inputDirDocker + "reference/";
    public static String refServerDir = "irods:RefFilePath/"; // needed for asm key file
    public static String outputDir = baseDir + "outputDir/";
    public static String outputDirDocker = baseDirDocker + "outputDir/";
    public static String alignDir = outputDir + "align/";
    public static String alignDirDocker = outputDirDocker + "align/";
    public static String alignGVCFDir = alignDir+"gvcfs/";
    public static String alignGVCFDirDocker = alignDirDocker+"gvcfs/";
    public static String tempFileDir = baseDir + "tempFileDir/";
    public static String tempFileDirDocker = baseDirDocker + "tempFileDir/";

    //Non autoGenerated Directories:
    public static String answerDir = smallSeqBaseDir+"answer/";
    public static String samDir = smallSeqBaseDir+"samFiles/";
    public static String pangenomeDir = baseDir+"pangenome/";
    public static String pangenomeDirDocker = baseDirDocker+"pangenome/";
    public static String genotypingFastqDir = baseDir + "data/";  //TODO fix this with a better path.  Should be in smallSeqBaseDir/
    public static String genotypingFastqDirDocker = baseDirDocker + "data/";  //TODO fix this with a better path.  Should be in smallSeqBaseDir/
    public static String dataDir = baseDir+"data/";
    public static String dataDirDocker = baseDirDocker+"data/";

    //Setting up file parameters:
    public static String pangenomePath = pangenomeDir+"pangenome"+fastaSuffix;
    public static String pangenomePathDocker = pangenomeDirDocker+"pangenome"+fastaSuffix;
    public static String refGenomePath=refGenomeDir+refGenomeName+fastaSuffix;
    public static String refGenomePathDocker=refGenomeDirDocker+refGenomeName+fastaSuffix;

    public static String phgDBName = baseDir + "phgSmallSeq.db";
    public static String phgDBNameDocker = baseDirDocker + "phgSmallSeq.db";

    // postgres file names - via docker - postgres lower-cases everything by default
    public static String postgresDockerfile = postgresDockerDir + "Dockerfile";
    public static String phgDBNamePostgres = "phgsmallseq"; // no directory, just file name
    public static String postgresUser = "postgres"; // these defaults are fine for smallseq
    public static String postgresUserPwd = "postgres"; // no sensitive data here
    // the postgresHost actually has to be determined by checking the user's host ipaddress
    public static String postgresHost = "localhost"; // "localhost" isn't working through docker
    public static String postgresPort = "5433";
    public static String postgresImageName = "phgpostgres_docker";
    public static String postgresContainer = "phgpostgres_container";
    // end postgres additions

    public static String anchorBedFileBase = baseDir + "anchors.bed";
    public static String anchorBedFileBaseDocker = baseDirDocker + "anchors.bed";
    public static String anchorBedFile = answerDir + "anchors.bed";

    public static String anchorGFFFileBase = baseDir + "anchors.gff";
    public static String anchorGFFFileBaseDocker = baseDirDocker + "anchors.gff";
    public static String anchorGFFFile = answerDir + "anchors.gff";
    public static String vcfFile = answerDir + "SmallSeq.vcf";

    public static String vcfDummy = baseDir + "testDummy.g.vcf";
    public static String vcfDummyDocker = baseDirDocker + "testDummy.g.vcf";
    public static String dbConfigFile = baseDir + "configSQLite.txt";
    public static String dbConfigFileDocker = baseDirDocker + "configSQLite.txt";
    public static String dbConfigFileName = "configSQLiteDocker.txt";
    public static String dbDockerConfigFile = baseDir + dbConfigFileName;
    public static String dbDockerConfigFileDockerPath = baseDirDocker + "configSQLiteDocker.txt";
    public static String dbPostgresConfigFileName = "configPostgresDocker.txt";
    public static String dbDockerPostgresConfigFile = baseDir + dbPostgresConfigFileName;
    public static String dbDockerPostgresConfigFileDockerPath = baseDirDocker + dbPostgresConfigFileName;
    public static String asmKeyFile = baseDir+"asm_keyFile.txt";
    public static String asmKeyFileDocker = baseDirDocker+"asm_keyFile.txt";
    public static String asmMAFKeyFile = baseDir+"asmMAF_keyFile.txt";
    public static String asmMAFKeyFileDocker = baseDirDocker+"asmMAF_keyFile.txt";
    public static String keyFile = baseDir+"keyFile.txt";
    public static String keyFileDocker = baseDirDocker+"keyFile.txt";
    public static String genotypingKeyFile = baseDir+"genotypingKeyFile.txt";
    public static String genotypingKeyFileDocker = baseDirDocker+"genotypingKeyFile.txt";
    public static String genotypingPathKeyFile = baseDir+"genotypingKeyFile_pathKeyFile.txt";
    public static String genotypingPathKeyFileDocker = baseDirDocker+"genotypingKeyFile_pathKeyFile.txt";
    public static String genotypingDebugDirDocker=baseDirDocker+"readMappingDebug/";
    public static String genotypingDebugDir=baseDir+"readMappingDebug/";
    public static String refLoadDataFileName = refGenomeName + "_Assembly_load_data.txt";
    public static String refLoadDataFile = refGenomeDir + refLoadDataFileName;
    public static String refLoadDataFileDocker = refGenomeDirDocker + refLoadDataFileName;

    // Ranking file needed when running consensus for assemblies.
    public static String rankingFile = baseDir+"ranking.txt";
    public static String rankingFileDocker = baseDirDocker+"ranking.txt";

    //TODO update these to make work with your environment, eventually we may want to put the docker up on Box
    //Set the docker name to whatever you named it when you built the docker
    public static final String dockerImageName = "phgrepository_test:latest";

    public static void resetBaseDirectory(String baseDirectory) {
        //Setting up directories
         smallSeqBaseDir = baseDirectory;
         baseDir = smallSeqBaseDir + "dockerBaseDir/";
         baseDirDocker = "/phg/";
         postgresDockerDir = smallSeqBaseDir + "postgresDocker/";
         postgresDataDir = smallSeqBaseDir + "postgresData/";
         inputDir = baseDir + "inputDir/";
         inputDirDocker = baseDirDocker + "inputDir/";
         assemblyDir = inputDir + "assemblies/";
         assemblyDirDocker = inputDirDocker + "assemblies/";
         loadDBDir = inputDir + "loadDB/";
         loadDBDirDocker = inputDirDocker + "loadDB/";
         fastqDir = loadDBDir + "fastq/";
         fastqDirDocker = loadDBDirDocker + "fastq/";
         bamDir = loadDBDir + "bam/";
         bamDirDocker = loadDBDirDocker + "bam/";
         bamDedupDir = bamDir + "dedup/";
         bamDedupDirDocker = bamDirDocker + "dedup/";
         bamMapQDir = bamDir + "mapqFiltered/";
         bamMapQDirDocker = bamDirDocker + "mapqFiltered/";
         gvcfDir = loadDBDir + "gvcf/";
         gvcfDirDocker = loadDBDirDocker + "gvcf/";
         refGenomeDir = inputDir + "reference/";
         refGenomeDirDocker = inputDirDocker + "reference/";
         outputDir = baseDir + "outputDir/";
         outputDirDocker = baseDirDocker + "outputDir/";
         alignDir = outputDir + "align/";
         alignDirDocker = outputDirDocker + "align/";
         alignGVCFDir = alignDir+"gvcfs/";
         alignGVCFDirDocker = alignDirDocker+"gvcfs/";
         tempFileDir = baseDir + "tempFileDir/";
         tempFileDirDocker = baseDirDocker + "tempFileDir/";

        //Non autoGenerated Directories:
         answerDir = smallSeqBaseDir+"answer/";
         samDir = smallSeqBaseDir+"samFiles/";
         pangenomeDir = baseDir+"pangenome/";
         pangenomeDirDocker = baseDirDocker+"pangenome/";
         genotypingFastqDir = baseDir + "data/";  //TODO fix this with a better path.  Should be in smallSeqBaseDir/
         genotypingFastqDirDocker = baseDirDocker + "data/";  //TODO fix this with a better path.  Should be in smallSeqBaseDir/
         dataDir = baseDir+"data/";
         dataDirDocker = baseDirDocker+"data/";

        //Setting up file parameters:
         pangenomePath = pangenomeDir+"pangenome"+fastaSuffix;
         pangenomePathDocker = pangenomeDirDocker+"pangenome"+fastaSuffix;
         refGenomePath=refGenomeDir+refGenomeName+fastaSuffix;
         refGenomePathDocker=refGenomeDirDocker+refGenomeName+fastaSuffix;

        // Add new name for postgres docker db
         phgDBName = baseDir + "phgSmallSeq.db";
         phgDBNameDocker = baseDirDocker + "phgSmallSeq.db";
         phgDBNamePostgres = "phgsmallseq"; // no folder, just the name for postgres
         anchorBedFileBase = baseDir + "anchors.bed";
         anchorBedFileBaseDocker = baseDirDocker + "anchors.bed";
         anchorBedFile = answerDir + "anchors.bed";
         vcfFile = answerDir + "SmallSeq.vcf";

         vcfDummy = baseDir + "testDummy.g.vcf";
         vcfDummyDocker = baseDirDocker + "testDummy.g.vcf";
         dbConfigFile = baseDir + "configSQLite.txt";
         dbConfigFileDocker = baseDirDocker + "configSQLite.txt";
         dbConfigFileName = "configSQLiteDocker.txt";
         dbDockerConfigFile = baseDir + dbConfigFileName;
         dbDockerConfigFileDockerPath = baseDirDocker + "configSQLiteDocker.txt";
         dbPostgresConfigFileName = "configPostgresDocker.txt";
         dbDockerPostgresConfigFile = baseDir + dbPostgresConfigFileName;
         dbDockerPostgresConfigFileDockerPath = baseDirDocker + dbPostgresConfigFileName;
         asmKeyFile = baseDir+"asm_keyFile.txt";
         asmKeyFileDocker = baseDirDocker+"asm_keyFile.txt";
         keyFile = baseDir+"keyFile.txt";
         keyFileDocker = baseDirDocker+"keyFile.txt";
         genotypingKeyFile = baseDir+"genotypingKeyFile.txt";
         genotypingKeyFileDocker = baseDirDocker+"genotypingKeyFile.txt";
         genotypingPathKeyFile = baseDir+"genotypingKeyFile_pathKeyFile.txt";
         genotypingPathKeyFileDocker = baseDirDocker+"genotypingKeyFile_pathKeyFile.txt";
         refLoadDataFileName = refGenomeName + "_Assembly_load_data.txt";
         refLoadDataFile = refGenomeDir + refLoadDataFileName;
         refLoadDataFileDocker = refGenomeDirDocker + refLoadDataFileName;
         genotypingDebugDirDocker=baseDirDocker+"readMappingDebug/";
         genotypingDebugDir=baseDir+"readMappingDebug/";
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy