Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update clade delimiter for different viruses #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions scripts/run_subspecies_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@
GENOTYPER_RESULT_F_NAME = "input.fasta.result"
GENOTYPER_ERROR_F_NAME = "input.fasta.err"

CLADE_DELIMITER = "(.+?)\|.+"
CLADE_DELIMITER = "([A-Za-z0-9._]+)\|.+"
CLADE_DELIMITER_INFLUENZAH5 = ".+_\{(.+)\}"
CLADE_DELIMITER_MPOX = "([A-Za-z0-9.]+)\|.+"
CLADE_DELIMITER_DENGUE = "(\d+).+"
REPORT_DATE = "<span>Report Date:</span> %s"
TABLE_HEADER_C = "<th class=\"dgrid-cell dgrid-cell-padding\">Query Identifier</th><th class=\"dgrid-cell dgrid-cell-padding\">Clade Classification</th><th class=\"dgrid-cell dgrid-cell-padding\">Tree Link</th>"
TABLE_HEADER_R_RESULT = "<th class=\"dgrid-cell dgrid-cell-padding\">Input FASTA unique ID</th><th class=\"dgrid-cell dgrid-cell-padding\" style=\"width:10%\">Segment number</th><th class=\"dgrid-cell dgrid-cell-padding\" style=\"width:10%\">Genotype</th><th class=\"dgrid-cell dgrid-cell-padding\">Best hit accession</th><th class=\"dgrid-cell dgrid-cell-padding\" style=\"width:13%\">Query coverage %</th><th class=\"dgrid-cell dgrid-cell-padding\" style=\"width:10%\">Ident %</th><th class=\"dgrid-cell dgrid-cell-padding\" style=\"width:10%\">E Value</th>"
Expand Down Expand Up @@ -232,7 +233,7 @@

#Pplacer
pplacer_output = os.path.join(output_dir, PPLACER_OUTPUT_F_NAME)
pplacer_cmd = ["pplacer", "-m", "GTR", "-t", reference_tree_file, "-s", stats_file, mafft_output, "-o", pplacer_output]
pplacer_cmd = ["pplacer", "-m", "GTR", "-t", reference_tree_file, "-s", stats_file, mafft_output, "-o", pplacer_output]
try:
subprocess.check_call(pplacer_cmd, shell=False)
except Exception as e:
Expand Down Expand Up @@ -262,8 +263,15 @@

if virus_type == "INFLUENZAH5":
cladinator_cmd.insert(1, "-S=%s" %(CLADE_DELIMITER_INFLUENZAH5))
if virus_type == "MPOX":
elif virus_type == "MPOX":
cladinator_cmd.insert(1, "-S=%s" %(CLADE_DELIMITER_MPOX))
elif virus_type == "DENGUE":
cladinator_cmd.insert(1, "-S=%s" %(CLADE_DELIMITER_DENGUE))
elif virus_type == "MASTADENOB":
pass
else:
cladinator_cmd.insert(1, "-S=%s" %(CLADE_DELIMITER))

if is_ortho or is_adeno or is_paramyxo or is_pox:
cladinator_cmd.insert(1, "-m=%s" %(mapping_file))
if is_adeno or is_paramyxo:
Expand Down
2 changes: 1 addition & 1 deletion service-scripts/App-SubspeciesClassification.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub preflight
return {
cpu => 2,
memory => "64G",
runtime => 10800,
runtime => 18000,
storage => 0,
};
}
Expand Down