0.1.14 • Published 8 months ago
@lipme/omique-utils-pipeline v0.1.14
Omique Utils Pipeline
A utility pipeline for transforming genomic data, designed for bioinformatics applications.
Table of Contents
Installation
To install the package, use npm:
npm install @lipme/omique-utils-pipelineUsage
This library provides utilities for working with genomic data, including BAM and GFF3 file processing.
Examples
1. Setting BAM Levels
import { setBamsLevels } from "@lipme/omique-utils-pipeline";
const bams = [
{ start: 1, end: 3 },
{ start: 2, end: 4 },
{ start: 3, end: 5 },
];
const leveledBams = setBamsLevels(bams);
console.log(leveledBams);2. Extracting CIGAR Information
import { cigarExtraction } from "@lipme/omique-utils-pipeline";
const bamData = [{ start: 1, end: 100, cigar: "10M5I5D" }];
const extractedCigar = cigarExtraction(bamData);
console.log(extractedCigar);3. Parsing MD Tags
import { extractMD } from "@lipme/omique-utils-pipeline";
const bamLines = [
{
MD: "10A5^C3",
seq: "ACGTACGTACGTACGTACGT",
start: 1,
end: 20,
strand: "+",
},
];
const mdData = extractMD(bamLines);
console.log(mdData);4. Assigning GFF Levels
import { RowNumberFactory } from "@lipme/omique-utils-pipeline";
const features = [
{ start: 1, end: 100 },
{ start: 50, end: 150 },
];
const rowFactory = RowNumberFactory(features);
const leveledFeatures = features.map(rowFactory);
console.log(leveledFeatures);Running Tests
To run the test suite, use:
npm testFor test coverage:
npm run test:coverageTo watch tests during development:
npm run test:watchBuilding Locally
To build the project locally:
Clone the repository:
git clone https://github.com/your-repo/omique-utils-pipeline.git cd omique-utils-pipelineInstall dependencies:
npm installBuild the project:
npm run build
The output will be available in the dist directory.
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and push the branch.
- Open a pull request.
License
This project is licensed under the ISC License. See the LICENSE file for details.