Skip to content

Commit

Permalink
Close #806, by adding extra references for HIVGHA project.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Feb 7, 2022
1 parent 3ceb954 commit 3c3f0f2
Show file tree
Hide file tree
Showing 7 changed files with 578 additions and 36 deletions.
3 changes: 3 additions & 0 deletions micall/blast_db/make_blast_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def make_blast_db(projects_json, refs_fasta):
for name, region in projects['regions'].items():
if region['seed_group'] is None:
continue
if region['seed_group'] == 'HIVGHA-seed':
# Exclude this project, because they're recombinant.
continue
if name == 'HIV1-CON-XX-Consensus-seed':
# Only used by G2P alignment.
continue
Expand Down
13 changes: 13 additions & 0 deletions micall/drivers/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from micall.core.coverage_plots import coverage_plot
from micall.core.plot_contigs import plot_genome_coverage
from micall.core.prelim_map import prelim_map
from micall.core.project_config import ProjectConfig
from micall.core.remap import remap, map_to_contigs
from micall.core.sam2aln import sam2aln
from micall.core.trim_fastqs import trim
Expand All @@ -22,6 +23,16 @@
logger = logging.getLogger(__name__)


def exclude_extra_seeds(excluded_seeds: typing.Sequence[str],
project_code: str = None) -> typing.Sequence[str]:
if project_code == 'HIVGHA':
return excluded_seeds
projects = ProjectConfig.loadDefault()
hivgha_seeds = projects.getProjectSeeds('HIVGHA')
hiv_seeds = projects.getProjectSeeds('HIV')
return sorted((hivgha_seeds - hiv_seeds) | set(excluded_seeds))


class Sample:
def __init__(self,
basespace_id=None,
Expand Down Expand Up @@ -126,6 +137,8 @@ def process(self,
use_gzip = force_gzip or self.fastq1.endswith('.gz')

sample_info = self.load_sample_info()
excluded_seeds = exclude_extra_seeds(excluded_seeds,
sample_info.get('project'))

with open(self.read_summary_csv, 'w') as read_summary:
trim((self.fastq1, self.fastq2),
Expand Down
48 changes: 36 additions & 12 deletions micall/project_scoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -6106,7 +6106,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6237,7 +6239,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6359,7 +6363,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6481,7 +6487,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6603,7 +6611,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6725,7 +6735,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6847,7 +6859,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -6969,7 +6983,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -7168,7 +7184,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -7347,7 +7365,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -7582,7 +7602,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
},
{
Expand Down Expand Up @@ -7704,7 +7726,9 @@
"HIV1-O-SN-AJ302646-seed",
"HIV1-O-US-JN571034-seed",
"HIV1-P-CM-HQ179987-seed",
"HIV1-P-FR-GU111555-seed"
"HIV1-P-FR-GU111555-seed",
"HIV1-CRF02_AG-GH-AB286855-seed",
"HIV1-CRF06_CPX-GH-AB286851-seed"
]
}
]
Expand Down
Loading

0 comments on commit 3c3f0f2

Please sign in to comment.