<commit_before>from rest_framework import serializers
from data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob
from data_refinery_common.models import (
    Experiment,
    ExperimentAnnotation,
    Sample,
    SampleAnnotation,
    Organism,
    OrganismIndex,
    OriginalFile,
    Processor,
    ComputationalResult,
    ComputationalResultAnnotation,
    ComputedFile,
    Dataset,
    APIToken
)

##
# Organism
##

class OrganismSerializer(serializers.ModelSerializer):
    class Meta:
        model = Organism
        fields = (
                    'name',
                    'taxonomy_id',
                )


##
# Processor
##

class ProcessorSerializer(serializers.ModelSerializer):
    class Meta:
        model = Processor
        fields = (
            'id',
            'name',
            'version',
            'docker_image',
            'environment'
        )


##
# Transcriptome Index
##

class OrganismIndexSerializer(serializers.ModelSerializer):
    class Meta:
        model = OrganismIndex
        fields = (
                    's3_url',
                    'source_version',
                    'salmon_version',
                    'last_modified',
                )

##
# Results
##

class ComputationalResultAnnotationSerializer(serializers.ModelSerializer):

    class Meta:
        model = ComputationalResultAnnotation<commit_msg>Add assembly_name to OrganismIndex API<commit_after>from rest_framework import serializers
from data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob
from data_refinery_common.models import (
    Experiment,
    ExperimentAnnotation,
    Sample,
    SampleAnnotation,
    Organism,
    OrganismIndex,
    OriginalFile,
    Processor,
    ComputationalResult,
    ComputationalResultAnnotation,
    ComputedFile,
    Dataset,
    APIToken
)

##
# Organism
##

class OrganismSerializer(serializers.ModelSerializer):
    class Meta:
        model = Organism
        fields = (
                    'name',
                    'taxonomy_id',
                )


##
# Processor
##

class ProcessorSerializer(serializers.ModelSerializer):
    class Meta:
        model = Processor
        fields = (
            'id',
            'name',
            'version',
            'docker_image',
            'environment'
        )


##
# Transcriptome Index
##

class OrganismIndexSerializer(serializers.ModelSerializer):
    class Meta:
        model = OrganismIndex
        fields = (
                    's3_url',
                    'source_version',
                    'assembly_name',
                    'salmon_version',
                    'last_modified',
                )

##
# Results
##

class ComputationalResultAnnotationSerializer(serializers.ModelSerializer):

    class Meta:
        model = ComputationalResultAnnotation
{'fraction_non_alphanumeric': 0.07586450247000706, 'fraction_numerical': 0.0007057163020465773, 'mean_word_length': 2.0223880597014925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2538810', 'n_tokens_mistral': 747, 'n_tokens_neox': 717, 'n_words': 142}