Commit 2b062f1d authored by frederic.bertels's avatar frederic.bertels
Browse files

added a parameter to the main function call that sets the group seed sequence distance.

parent c1056f5f
Pipeline #266105 failed with stages
in 8 minutes and 10 seconds
......@@ -11,7 +11,7 @@ public class DetermineFocalSeeds {
File outFolder=new File(args[1]);
int minFreq=Integer.parseInt(args[2]);
int wordLength=Integer.parseInt(args[3]);
DetermineFocalSeeds dfs=new DetermineFocalSeeds(genome,outFolder,minFreq,wordLength);
DetermineFocalSeeds dfs=new DetermineFocalSeeds(genome,outFolder,minFreq,wordLength,30);
}
File genome;
int wl;
......@@ -21,8 +21,9 @@ public class DetermineFocalSeeds {
int flanking =30;
String[] seedSequences;
File outFolder;
public DetermineFocalSeeds(File genome,File outFolder,int minRepFreq,int wl) {
public DetermineFocalSeeds(File genome,File outFolder,int minRepFreq,int wl, int flanking) {
this.genome=genome;
this.flanking=flanking;
this.outFolder=outFolder;
this.wl=wl;
genomeFolder=genome.getParentFile();
......
......@@ -50,21 +50,22 @@ public class DeterminePopulationFrequencies {
DeterminePopulationFrequencies dpf;
String program="tblastn";
int MCLThreads=Integer.parseInt(args[9]);
int distanceGroupSeeds=Integer.parseInt(args[10]);
// legacy_blast path not given.
if(args.length==10) {
dpf=new DeterminePopulationFrequencies(inFolder,outFolder, focalSeedGenome,minRepFreq,wordlength,queryRAYT,program,treeFile,"",evalue,analyseREPIN,MCLThreads);
if(args.length==11) {
dpf=new DeterminePopulationFrequencies(inFolder,outFolder, focalSeedGenome,minRepFreq,wordlength,queryRAYT,program,treeFile,"",evalue,analyseREPIN,MCLThreads,distanceGroupSeeds);
dpf.print(out);
}
// legacy_blast path given.
else if(args.length==11) {
String legacyBlastPerlLocation=args[10];
dpf=new DeterminePopulationFrequencies(inFolder, outFolder,focalSeedGenome,minRepFreq,wordlength,queryRAYT,program,treeFile,legacyBlastPerlLocation,evalue,analyseREPIN,MCLThreads);
else if(args.length==12) {
String legacyBlastPerlLocation=args[11];
dpf=new DeterminePopulationFrequencies(inFolder, outFolder,focalSeedGenome,minRepFreq,wordlength,queryRAYT,program,treeFile,legacyBlastPerlLocation,evalue,analyseREPIN,MCLThreads,distanceGroupSeeds);
dpf.print(out);
}
}
// Workhorse function.
public DeterminePopulationFrequencies(File inFolder,File outFolder,String focalSeedGenome,int minRepFreq,int wordlength,File queryRAYT,String program,File treeFile,String legacyBlastPerlLocation,String evalue,boolean analyseREPIN,int MCLThreads){
public DeterminePopulationFrequencies(File inFolder,File outFolder,String focalSeedGenome,int minRepFreq,int wordlength,File queryRAYT,String program,File treeFile,String legacyBlastPerlLocation,String evalue,boolean analyseREPIN,int MCLThreads,int distanceGroupSeeds){
this.inFolder=inFolder;
this.outFolder=outFolder;
this.MCLThreads=MCLThreads;
......@@ -72,7 +73,7 @@ public class DeterminePopulationFrequencies {
genomes=getFiles();
this.legacyBlastPerlLocation=legacyBlastPerlLocation;
this.queryRAYT=queryRAYT;
this.focalSeeds=getFocalSeeds(focalSeedGenome,minRepFreq,wordlength);
this.focalSeeds=getFocalSeeds(focalSeedGenome,minRepFreq,wordlength,distanceGroupSeeds);
this.genomeFolder=inFolder;
this.analyseREPIN=analyseREPIN;
e=evalue;
......@@ -116,9 +117,9 @@ public class DeterminePopulationFrequencies {
return list.toArray(new String[0]);
}
private String[] getFocalSeeds(String genome,int minRepFreq,int wl) {
private String[] getFocalSeeds(String genome,int minRepFreq,int wl,int distanceGroupSeeds) {
File fsg=new File(inFolder+"/"+genome);
DetermineFocalSeeds dfs=new DetermineFocalSeeds(fsg,outFolder,minRepFreq,wl);
DetermineFocalSeeds dfs=new DetermineFocalSeeds(fsg,outFolder,minRepFreq,wl,distanceGroupSeeds);
return dfs.getFocalSeeds();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment