Skip to content

Commit

Permalink
Add sequence, slice, and read schema
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh committed Sep 14, 2016
1 parent 99efd23 commit b0e3f1a
Showing 1 changed file with 164 additions and 2 deletions.
166 changes: 164 additions & 2 deletions src/main/resources/avro/bdg.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ record Feature {

/**
Sample.
*/
*/
record Sample {

/**
Expand All @@ -1221,4 +1221,166 @@ record Sample {
*/
map<string> attributes = {};
}
}

/**
Alphabet.
*/
enum Alphabet {

/**
DNA alphabet.
*/
DNA,

/**
RNA alphabet.
*/
RNA,

/**
Protein alphabet.
*/
PROTEIN
}

/**
Sequence.
*/
record Sequence {

/**
Name of this sequence.
*/
union { null, string } name = null;

/**
Description for this sequence.
*/
union { null, string } description = null;

/**
Alphabet for this sequence, defaults to Alphabet.DNA.
*/
union { Alphabet, null } alphabet = "DNA";

/**
Sequence.
*/
union { null, string } sequence = null;

/**
Length of this sequence.
*/
union { null, long } length = null;
}

/**
View on a contiguous region of a sequence.
*/
record Slice { // extends Sequence

/**
Name of the sequence this slice views.
*/
union { null, string } name = null;

/**
Description for the sequence this slice views.
*/
union { null, string } description = null;

/**
Alphabet for the sequence this slice views, defaults to Alphabet.DNA.
*/
union { Alphabet, null } alphabet = "DNA";

/**
Sequence for this slice.
*/
union { null, string } sequence = null;

/**
Start position for this slice on the sequence this slice views, in 0-based coordinate
system with closed-open intervals.
*/
union { null, long } start = null;

/**
End position for this slice on the sequence this slice views, in 0-based coordinate
system with closed-open intervals.
*/
union { null, long } end = null;

/**
Strand for this slice, if any. Defaults to Strand.Independent.
*/
union { Strand, null } strand = "Independent";

/**
Length of this slice.
*/
union { null, long } length = null;
}

/**
FASTQ sequence format variant.
*/
enum FastqVariant {

/**
Sanger and Illumina version &gt;= 1.8 FASTQ sequence format variant.
*/
SANGER,

/**
Solexa and Illumina version 1.0 FASTQ sequence format variant.
*/
SOLEXA,

/**
Illumina version &gt;= 1.3 and &lt; 1.8 FASTQ sequence format variant.
*/
ILLUMINA
}

/**
Sequence with quality scores.
*/
record Read { // extends Sequence

/**
Name of this read.
*/
union { null, string } name = null;

/**
Description for this read.
*/
union { null, string } description = null;

/**
Alphabet for this read, defaults to Alphabet.DNA.
*/
union { Alphabet, null } alphabet = "DNA";

/**
Sequence for this read.
*/
union { null, string } sequence = null;

/**
Length of this read.
*/
union { null, long } length = null;

/**
FASTQ sequence format variant for this read, defaults to FastqVariant.SANGER.
*/
union { FastqVariant, null } fastqVariant = "SANGER";

/**
Quality scores for this read.
*/
union { null, string } qualityScores = null;
}
}

0 comments on commit b0e3f1a

Please sign in to comment.