// Use three dictionaries.
Output A > {'ACG': [0], 'CGT': [1], 'GTT': [2], 'TTC': [3], 'TCC': [4], 'CCG': [5], 'CGG': [6, 10, 15]}
Output B > {'AAT': [0], 'ATA': [1], 'TAT': [2], 'ATC': [3], 'TCC': [4], 'CCG': [5], 'CGA': [6]}
Fixed Output C > {'ACG': [0], 'CGT': [1], 'GTT': [2], 'TTC': [3], 'TCC': [4], 'CCG': [5], 'CGG': [6, 10]}
Desired output value
Output:
C_sample reference comparison target A_sample:
// Use three dictionaries.
Output C > {'ACG': [0], 'CGT': [1], 'GTT': [2], 'TTC': [3], 'TCC': [4], 'CCG': [5], 'CGG': [6, 10]}
C_sample reference comparison target B_sample:
// Use three dictionaries.
Output C > {'TCC': [4], 'CCG': [5]}
B_sample reference comparison target C_sample:
// Use three dictionaries.
Output B > {'TCC': [4], 'CCG': [5]}
A_sample reference comparison target C_sample:
// Use three dictionaries.
Output A > {'ACG': [0], 'CGT': [1], 'GTT': [2], 'TTC': [3], 'TCC': [4], 'CCG': [5], 'CGG': [6, 10, 15]}
{k:C[k] for k in (set(B) & set(C))}
{'TCC': [4], 'CCG': [5]}
© 2024 OneMinuteCode. All rights reserved.