rki-mf1 / covsonar

A database-driven system for handling genomic sequences of SARS-CoV-2 and screening genomic profiles.
GNU General Public License v3.0
6 stars 0 forks source link

Match query fails with AttributeError: 'NoneType' object has no attribute 'split' #112

Closed matthuska closed 1 year ago

matthuska commented 1 year ago
python sonar.py match  --db database.db --date 2021-07-01:2022-12-31 --zip Germany --tsv > outfile.tsv

Traceback (most recent call last):
  File "<snip>/covsonar/sonar.py", line 530, in <module>
    snr.match_genomes(include_profiles=args.include, exclude_profiles=args.exclude, accessions=args.acc, lineages=args.lineage, with_sublineage=args.with_sublineage, zips=args.zip, dates=args.date, submission_dates=args.submission_date, labs=args.lab, sources=args.source, collections=args.collection, technologies=args.technology, platforms=args.platform, chemistries=args.chemistry, software=args.software, software_version=args.version, materials=args.material, min_ct=args.min_ct, max_ct=args.max_ct, ambig=args.ambig, count=args.count, frameshifts=frameshifts, tsv=args.tsv)
  File "<snip>/covsonar/sonar.py", line 301, in match_genomes
    rows = self.db.match(include_profiles=include_profiles, exclude_profiles=exclude_profiles, accessions=accessions, lineages=lineages, with_sublineage=with_sublineage, zips=zips, dates=dates, submission_dates=submission_dates, labs=labs, sources=sources, collections=collections, technologies=technologies, platforms=platforms, chemistries=chemistries, software=software, software_version=software_version, materials=materials, min_ct=min_ct, max_ct=max_ct, ambig=ambig, count=count, frameshifts=frameshifts, debug=debug)
  File "<snip>/covsonar/lib/sonardb.py", line 3045, in match
    rows[i]['dna_profile'] = self.filter_ambig(rows[i]['dna_profile'], self.iupac_explicit_nt_code, keep)
  File "<snip>/covsonar/lib/sonardb.py", line 2622, in filter_ambig
    for mutation in list(filter(None, profile.split(" "))):
AttributeError: 'NoneType' object has no attribute 'split'