Skip to content

Commit

Permalink
bugfix: metadata.duplicate_count instead of .count in KmerFrequencyEn…
Browse files Browse the repository at this point in the history
…coder, update docs
  • Loading branch information
LonnekeScheffer committed Feb 6, 2024
1 parent 751ae6b commit df8d253
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
class SequenceMetadata:
"""
class modeling the existing knowledge about a receptor_sequence, should be stored according to
IMGT gene nomenclature (human can be found `here
<http://www.imgt.org/IMGTrepertoire/index.php?section=LocusGenes&repertoire=genetable&species=human&group=TRBV>`_):
AIRR nomenclature
- v call
- j call
- chain
- count
- duplicate_count
- region_type (e.g. IMGT_CDR3, IMGT_CDR1, FULL_SEQUENCE)
- frame_type (e.g. IN, OUT, STOP)
- sample
Expand Down
2 changes: 1 addition & 1 deletion immuneML/encodings/kmer_frequency/KmerFrequencyEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _encode_sequence(self, sequence: ReceptorSequence, params: EncoderParams, se
if self.reads == ReadsType.UNIQUE:
counts[i] += 1
elif self.reads == ReadsType.ALL:
counts[i] += sequence.metadata.count
counts[i] += sequence.metadata.duplicate_count
return counts

def get_additional_files(self) -> List[str]:
Expand Down

0 comments on commit df8d253

Please sign in to comment.