DataFrame-GTF

GTF to DataFrame Parser for Java

License

License

Categories

Categories

Data
GroupId

GroupId

de.unknownreality
ArtifactId

ArtifactId

dataframe-gtf
Last Version

Last Version

0.2.4
Release Date

Release Date

Type

Type

jar
Description

Description

DataFrame-GTF
GTF to DataFrame Parser for Java
Project URL

Project URL

https://github.com/nRo/DataFrame-GTF
Source Code Management

Source Code Management

https://github.com/nRo/DataFrame-GTF

Download dataframe-gtf

How to add to project

<!-- https://jarcasting.com/artifacts/de.unknownreality/dataframe-gtf/ -->
<dependency>
    <groupId>de.unknownreality</groupId>
    <artifactId>dataframe-gtf</artifactId>
    <version>0.2.4</version>
</dependency>
// https://jarcasting.com/artifacts/de.unknownreality/dataframe-gtf/
implementation 'de.unknownreality:dataframe-gtf:0.2.4'
// https://jarcasting.com/artifacts/de.unknownreality/dataframe-gtf/
implementation ("de.unknownreality:dataframe-gtf:0.2.4")
'de.unknownreality:dataframe-gtf:jar:0.2.4'
<dependency org="de.unknownreality" name="dataframe-gtf" rev="0.2.4">
  <artifact name="dataframe-gtf" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.unknownreality', module='dataframe-gtf', version='0.2.4')
)
libraryDependencies += "de.unknownreality" % "dataframe-gtf" % "0.2.4"
[de.unknownreality/dataframe-gtf "0.2.4"]

Dependencies

provided (1)

Group / Artifact Type Version
de.unknownreality : dataframe jar 0.7.5.2

test (2)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.25
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

GTF parser for Java Dataframes

A GTF Reader and Writer for Java DataFrames.

The GTF Format is implemented according to this documentation:

GFF/GTF File Format

travis codecov Codacy Badge

Documentation

Javadocs

Install

Maven Central

Add this to you pom.xml

<dependencies>
...
    <dependency>
        <groupId>de.unknownreality</groupId>
        <artifactId>dataframe-gtf</artifactId>
        <version>0.2.4</version>
    </dependency>
...
</dependencies>

Build

To build the library from sources:

  1. Clone github repository

    $ git clone https://github.com/nRo/DataFrame-GTF.git

  2. Change to the created folder and run mvn install

    $ cd DataFrame-GTF

    $ mvn install

  3. Include it by adding the following to your project's pom.xml:

<dependencies>
...
    <dependency>
        <groupId>de.unknownreality</groupId>
        <artifactId>dataframe-gtf</artifactId>
        <version>0.2.4-SNAPSHOT</version>
    </dependency>
...
</dependencies>

Usage

Create a DataFrame from a GTF file

File gtfFile = new File("genome.gtf");
DataFrame df = DataFrame.load(gtfFile,GTFFormat.GTF)

Per default, all GTF fields are included in the resulting DataFrame. Attributes can be added by adding them to the GTF reader.

GTFReader gtfReader = GTFReaderBuilder.create()
                .withAttribute("gene_id")
                .build();
DataFrame df = DataFrame.load(gtfFile, gtfReader);

The column type of GTF fields is predefined:

GTF field type
seqname String
source String
feature String
start Long
end Long
score Double
strand String
frame Integer

The type of attributes can be specified

GTFReader gtfReader = GTFReaderBuilder.create()
                .withAttribute("gene_id")
                .withAttribute("test_value", DoubleColumn.class)
                .build();
DataFrame df = DataFrame.load(gtfFile, gtfReader);

DataFrames can be written according to the GTF format.

dataFrame.write(new File("result.gtf"), GTFFormat.GTF);

Versions

Version
0.2.4
0.2.1
0.2