uploader.models.UploadedFile

class uploader.models.UploadedFile(*args, **kwargs)[source]

Model for ingesting bulk data uploads of both spectral and meta data files.

meta_data_file

The uploaded file containing rows of patient meta-data, e.g., observations, biosample collection info, etc.

Type:

django.models.FileField

spectral_data_file

The uploaded file containing rows of patient spectral data.

Type:

django.models.FileField

center

The center that all new uploaded patients will be associated to.

Type:

django.models.ForeignKey of user.models.Center

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

adelete(*args, **kwargs)

arefresh_from_db([using, fields, from_queryset])

asave(*args, **kwargs)

check(**kwargs)

clean()

Model validation.

clean_fields([exclude])

Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.

date_error_message(lookup_type, field_name, ...)

delete(*args[, delete_files])

from_db(db, field_names, values)

full_clean([exclude, validate_unique, ...])

Call clean_fields(), clean(), validate_unique(), and validate_constraints() on the model.

get_column_names([help_text])

get_constraints()

get_deferred_fields()

Return a set containing names of deferred fields for this instance.

get_next_by_created_at(*[, field, is_next])

get_next_by_updated_at(*[, field, is_next])

get_orphan_files()

get_previous_by_created_at(*[, field, is_next])

get_previous_by_updated_at(*[, field, is_next])

join_with_validation(meta_data, spec_data)

Validate primary keys are unique and associative.

prepare_database_save(field)

refresh_from_db([using, fields, from_queryset])

Reload field values from the database.

save(*args, **kwargs)

Save the current instance.

save_base([raw, force_insert, force_update, ...])

Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too.

serializable_value(field_name)

Return the value of the field name for this instance.

unique_error_message(model_class, unique_check)

validate_constraints([exclude])

validate_lengths(meta_data, spec_data)

Validate that files must be of equal length (same number of rows).

validate_unique([exclude])

Check unique constraints on the model and raise ValidationError if any failed.

Attributes

UPLOAD_DIR

center

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

center_id

created_at

A wrapper for a deferred-loading field.

id

A wrapper for a deferred-loading field.

meta_data_file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like::.

objects

pk

spectral_data_file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like::.

updated_at

A wrapper for a deferred-loading field.