An open API service indexing awesome lists of open source software.

https://github.com/biocentral/bio_flutter

Working with biological data in flutter.
https://github.com/biocentral/bio_flutter

dart embeddings fasta flutter protein protein-protein-interaction umap

Last synced: 3 months ago
JSON representation

Working with biological data in flutter.

Awesome Lists containing this project

README

          

Cross-platform representation and visualization of biological data in flutter.

## Features

**Widgets**:

* Projection Data Visualizer:

An animated image of the Projection Visualizer widget

**Biological Data Classes**:

* Protein
* Sequence: AminoAcidSequence, NucleotideSequence
* Protein-Protein Interaction
* Taxonomy

**Protein Representation and Data Analysis**:

* Embedding: PerSequence, PerResidue
* UMAP

**File handling**:

| Name | fasta | csv | json |
|---------------------------|:-----:|:---:|:----:|
| Protein | ✅ | ❌ | ❌ |
| ProteinProteinInteraction | ✅ | ❌ | ❌ |
| Embedding | ❌ | ❌ | ✅ |
| ProjectionData | ❌ | ✅ | ❌ |
| CustomAttributes | ❌ | ✅ | ❌ |

## Usage

**Load and write a protein fasta file**:

```dart
import 'package:flutter_test/flutter_test.dart';

Future> readFastaFileProtein(String pathToFile) async {
BioFileHandlerContext? handler = BioFileHandler().create(pathToFile);
Map proteins = await handler.read();
return proteins.values.toList();
}

Future saveProteins(List proteins, String pathToFile) async {
// Saves the file on desktop/mobile, downloads on web
BioFileHandlerContext? handler = BioFileHandler().create(pathToFile);
await handler.write(proteins.asMap().map((_, value) => MapEntry(value.id, value)));
}
```

**Add custom attributes to your proteins**:

```dart
import 'package:flutter_test/flutter_test.dart';

Future> addCustomAttributes(List proteins, String pathToFile) async {
BioFileHandlerContext? handler = BioFileHandler().create(pathToFile);
Map attributes = await handler.read();
List updatedProteins = [];
for (Protein protein in proteins) {
if (attributes.containsKey(protein.id)) {
Protein updated = protein.updateFromCustomAttributes(attributes[protein.id]!);
updatedProteins.add(updated);
}
}
return updatedProteins;
}
```

**Create a UMAP Visualizer Widget with random coordinates**:

```dart
Widget createProjectionWidget(List interactionData) {
return ProjectionVisualizer(
projectionData: ProjectionData.random(interactionData.length),
pointIdentifierKey: "id",
pointData: interactionData.map((interaction) => interaction.toMap()).toList()); // Also works with protein data
}
```

## Additional information

The correctness of the provided operations is the most important focus of this package in order to be useful for
scientists and practitioners in research and development. We are grateful for every reported bug and contribution to
the codebase on GitHub!

**Current Roadmap**:

* Increase test coverage
* Improve documentation
* Support more file formats for all data types
* Add 3D protein visualization