Script
StringBuilder sb = new StringBuilder();
sb.append("{\"inputFiles\":[{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append(BucketFilename_);
sb.append("\"}],\"requiredOutputFiles\":[{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
if (sff_or_fastq.equals("fastq"))
{
sb.append("Contigs.fasta");
sb.append("\"},");
}
if (sff_or_fastq.equals("sff"))
{
sb.append("Contigs.fasta");
sb.append("\"},");
sb.append("{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append("Contigs.xml");
sb.append("\"},");
}
if (Fast_Slow_Blast.equals("fast"))
{
sb.append("{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append("random.fasta");
sb.append("\"},");
}
sb.append("{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append("organism.blast");
sb.append("\"},");
sb.append("{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append("organism.txt");
sb.append("\"},");
sb.append("{\"bucket\":\"");
sb.append(BucketName_);
sb.append("\",\"path\":\"");
sb.append(BucketPath_);
sb.append("\",\"name\":\"");
sb.append("Organism_ID.txt");
sb.append("\"}");
sb.append("],\"optionalOutputFiles\":[],\"commandLines\":[");
if (sff_or_fastq.equals("fastq"))
{
sb.append("\"mpirun -np 32 /home/ubuntu/ray-build/Ray -s ");
sb.append(BucketFilename_);
sb.append(" -o Ray_Sample_Taverna\",\"mv %working_dir/Ray_Sample_Taverna/Contigs.fasta %working_dir\",");
}
if (sff_or_fastq.equals("sff"))
{
sb.append("\"python /home/ubuntu/sff_extract_0_3_0.py %working_dir/");
sb.append(BucketFilename_);
sb.append("\",");
sb.append("\"mv %working_dir/");
sb.append(Project_Name);
sb.append(".fastq %working_dir/sample_in.iontor.fastq\",");
sb.append("\"mv %working_dir/");
sb.append(Project_Name);
sb.append(".xml %working_dir/sample_traceinfo_in.iontor.fastq\",");
sb.append("\"mira --project=sample --job=denovo,genome,accurate,iontor --fastq\",");
sb.append("\"mv %working_dir/sample_assembly/sample_d_results/sample_out.unpadded.fasta %working_dir/Contigs.fasta\",");
}
if (Fast_Slow_Blast.equals("fast"))
{
sb.append("\"cp /home/ubuntu/Java_Parsers/jar/ParseFastaUpdate.class %working_dir\",");
sb.append("\"java ParseFastaUpdate Contigs.fasta random.fasta\",");
sb.append("\"blastall -p blastn -a 16 -d /home/ubuntu/blast_nt_db_t/nt -i %working_dir/random.fasta -o output.blast\",");
}
if (Fast_Slow_Blast.equals("slow"))
{
sb.append("\"blastall -p blastn -a 16 -d /home/ubuntu/blast_nt_db_t/nt -i %working_dir/Contigs.fasta -o output.blast\",");
}
sb.append("\"java ParserBLASTUpdated output.blast organism.txt\"");
sb.append("]}");
json = sb.toString();
Comments (0)
No comments yet
Log in to make a comment