epigen-UCSD / epigen_ucsd_django

1 stars 1 forks source link

[snAPP] generic foreign keys seems that db not matching with table #484

Closed biomystery closed 4 years ago

biomystery commented 4 years ago

number of libs that have QCs are different in db vs. table.

biomystery commented 4 years ago

for i in *; do echo $i; updateSingleCellStatus.py -seqid $i -status Yes; done

error 1:

MM_284
recvd args: MM_284 10xATAC
Traceback (most recent call last):
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 66, in <module>
    main(seq_id, status)
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 50, in main
    seq_id, sc_obj.experiment_type)
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 131, in generate_qc_metrics_table
    data_dict[m] = type_data(data[1][i])
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 186, in type_data
    data = int(data.replace(',', ''))
ValueError: invalid literal for int() with base 10: 'None'

error 2

MM_262_1
recvd args: MM_262_1 10xATAC
Traceback (most recent call last):
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 66, in <module>
    main(seq_id, status)
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 50, in main
    seq_id, sc_obj.experiment_type)
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 137, in generate_qc_metrics_table
    model_ = TenxqcInfo(**data_dict)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/base.py", line 501, in __init__
    raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, kwarg))
TypeError: TenxqcInfo() got an unexpected keyword argument 'median_per_cell_unique_fragments_at_30000_RRPC'
biomystery commented 4 years ago

/projects/ps-epigen/outputs/10xATAC/XH_154_1/outs/

permission denied.

biomystery commented 4 years ago
MM_285
recvd args: MM_285 10xATAC
Traceback (most recent call last):
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 65, in <module>
    main(seq_id, status)
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 49, in main
    seq_id, sc_obj.experiment_type)
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 131, in generate_qc_metrics_table
    data_dict[m] = type_data(data[1][i])
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 189, in type_data
    data = int(data.replace(',', ''))
ValueError: invalid literal for int() with base 10: 'None'
biomystery commented 4 years ago
M_156
recvd args: MM_156 10xATAC
Traceback (most recent call last):
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 65, in <module>
    main(seq_id, status)
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 49, in main
    seq_id, sc_obj.experiment_type)
  File "/home/zhc268/epigen_ucsd_django/utility/populate_singlecell_objects.py", line 145, in generate_qc_metrics_table
    model_.save()
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/base.py", line 741, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/base.py", line 779, in save_base
    force_update, using, update_fields,
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/base.py", line 870, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/base.py", line 908, in _do_insert
    using=using, raw=raw)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/query.py", line 1186, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1334, in execute_sql
    for sql, params in self.as_sql():
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1278, in as_sql
    for obj in self.query.objs
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1278, in <listcomp>
    for obj in self.query.objs
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1277, in <listcomp>
    [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1218, in prepare_value
    value = field.get_db_prep_save(value, connection=self.connection)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1565, in get_db_prep_save
    return connection.ops.adapt_decimalfield_value(self.to_python(value), self.max_digits, self.decimal_places)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/backends/base/operations.py", line 516, in adapt_decimalfield_value
    return utils.format_number(value, max_digits, decimal_places)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/backends/utils.py", line 238, in format_number
    value = value.quantize(decimal.Decimal(1).scaleb(-decimal_places), context=context)
decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
biomystery commented 4 years ago
MM_153_1_2
Traceback (most recent call last):
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 65, in <module>
    main(seq_id, status)
  File "/home/zhc268/epigen_ucsd_django/utility/updateSingleCellStatus.py", line 39, in main
    sc_obj = SingleCellObject.objects.get(seqinfo__seq_id=seq_id)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/zhc268/anaconda3/envs/django/lib/python3.6/site-packages/django/db/models/query.py", line 408, in get
    self.model._meta.object_name
singlecell_app.models.DoesNotExist: SingleCellObject matching query does not exist.
biomystery commented 4 years ago

0bf27b2