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.
- Host: GitHub
- URL: https://github.com/biocentral/bio_flutter
- Owner: biocentral
- License: bsd-3-clause
- Created: 2024-03-12T11:08:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-02T11:03:12.000Z (6 months ago)
- Last Synced: 2025-12-05T07:45:10.836Z (6 months ago)
- Topics: dart, embeddings, fasta, flutter, protein, protein-protein-interaction, umap
- Language: Dart
- Homepage: https://pub.dev/packages/bio_flutter
- Size: 3.73 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Cross-platform representation and visualization of biological data in flutter.
## Features
**Widgets**:
* Projection Data Visualizer:

**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