Performs a broadcast inner join between this RDD and another RDD.
Performs a broadcast inner join between this RDD and another RDD.
In a broadcast join, the left RDD (this RDD) is collected to the driver, and broadcast to all the nodes in the cluster. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space.
Computes the mismatching positions field (SAM "MD" tag).
Computes the mismatching positions field (SAM "MD" tag).
A reference file that can be broadcast to all nodes.
If true, overwrites the MD tags on reads where it is already populated. If false, we only tag reads that are currently missing an MD tag. Default is false.
If we are recalculating existing tags and we find that the MD tag that was previously on the read doesn't match our new tag, LENIENT will log a warning message, STRICT will throw an exception, and SILENT will ignore. Default is LENIENT.
Returns a new AlignmentRecordRDD where all reads have the mismatchingPositions field populated.
Converts an RDD of ADAM read records into SAM records.
Converts an RDD of ADAM read records into SAM records.
Returns a SAM/BAM formatted RDD of reads, as well as the file header.
Cuts reads into _k_-mers, and then counts the number of occurrences of each _k_-mer.
Cuts reads into _k_-mers, and then counts the number of occurrences of each _k_-mer.
The value of _k_ to use for cutting _k_-mers.
Returns an RDD containing k-mer/count pairs.
Runs a filter that selects data in the underlying RDD that overlaps a single genomic region.
Runs a filter that selects data in the underlying RDD that overlaps a single genomic region.
The region to query for.
Returns a new GenomicRDD containing only data that overlaps the query region.
Runs a filter that selects data in the underlying RDD that overlaps several genomic regions.
Runs a filter that selects data in the underlying RDD that overlaps several genomic regions.
The regions to query for.
Returns a new GenomicRDD containing only data that overlaps the querys region.
Runs a quality control pass akin to the Samtools FlagStat tool.
Runs a quality control pass akin to the Samtools FlagStat tool.
Returns a tuple of (failedQualityMetrics, passedQualityMetrics)
Performs a sort-merge full outer join between this RDD and another RDD.
Performs a sort-merge full outer join between this RDD and another RDD.
In a sort-merge join, both RDDs are co-partitioned and sorted. The
partitions are then zipped, and we do a merge join on each partition.
The key equality function used for this join is the reference region
overlap function. Since this is a full outer join, if a value from either
RDD does not overlap any values in the other RDD, it will be paired with
a None
in the product of the join.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that
overlapped in the genomic coordinate space, and values that did not
overlap will be paired with a None
.
Returns all reference regions that overlap this read.
Returns all reference regions that overlap this read.
If a read is unaligned, it covers no reference region. If a read is aligned we expect it to cover a single region. A chimeric read would cover multiple regions, but we store chimeric reads in a way similar to BAM, where the split alignments are stored in multiple separate reads.
Read to produce regions for.
The seq of reference regions this read covers.
The underlying RDD of genomic data, as a JavaRDD.
The underlying RDD of genomic data, as a JavaRDD.
Performs a sort-merge left outer join between this RDD and another RDD.
Performs a sort-merge left outer join between this RDD and another RDD.
In a sort-merge join, both RDDs are co-partitioned and sorted. The
partitions are then zipped, and we do a merge join on each partition.
The key equality function used for this join is the reference region
overlap function. Since this is a left outer join, all values in the
right RDD that do not overlap a value from the left RDD are dropped.
If a value from the left RDD does not overlap any values in the right
RDD, it will be paired with a None
in the product of the join.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the left RDD that did not overlap a key in the right RDD.
Marks reads as possible fragment duplicates.
Marks reads as possible fragment duplicates.
A new RDD where reads have the duplicate read flag set. Duplicate reads are NOT filtered out.
Pipes genomic data to a subprocess that runs in parallel using Spark.
Pipes genomic data to a subprocess that runs in parallel using Spark.
Files are substituted in to the command with a $x syntax. E.g., to invoke a command that uses the first file from the files Seq, use $0.
Pipes require the presence of an InFormatterCompanion and an OutFormatter as implicit values. The InFormatterCompanion should be a singleton whose apply method builds an InFormatter given a specific type of GenomicRDD. The implicit InFormatterCompanion yields an InFormatter which is used to format the input to the pipe, and the implicit OutFormatter is used to parse the output from the pipe.
The type of the record created by the piped command.
A GenomicRDD containing X's.
The InFormatter to use for formatting the data being piped to the command.
Command to run.
Files to make locally available to the commands being run. Default is empty.
A map containing environment variable/value pairs to set in the environment for the newly created process. Default is empty.
Number of bases to flank each command invocation by.
Returns a new GenomicRDD of type Y.
The RDD of genomic data that we are wrapping.
The RDD of genomic data that we are wrapping.
Realigns indels using a concensus-based heuristic.
Realigns indels using a concensus-based heuristic.
The model to use for generating consensus sequences to realign against.
If the input data is sorted, setting this parameter to true avoids a second sort.
The size of the largest indel to use for realignment.
The maximum number of consensus sequences to realign against per target region.
Log-odds threshold to use when realigning; realignments are only finalized if the log-odds threshold is exceeded.
The maximum width of a single target region for realignment.
Returns an RDD of mapped reads which have been realigned.
Reassembles read pairs from two sets of unpaired reads.
Reassembles read pairs from two sets of unpaired reads. The assumption is that the two sets were _originally_ paired together.
The rdd containing the second read from the pairs.
How stringently to validate the reads.
Returns an RDD with the pair information recomputed.
The RDD that this is called on should be the RDD with the first read from the pair.
Runs base quality score recalibration on a set of reads.
Runs base quality score recalibration on a set of reads. Uses a table of known SNPs to mask true variation during the recalibration process.
A table of known SNPs to mask valid variants.
An optional local path to dump recalibration observations to.
Returns an RDD of recalibrated reads.
A dictionary describing the read groups attached to this GenomicRDD.
A dictionary describing the read groups attached to this GenomicRDD.
Replaces the underlying RDD and SequenceDictionary and emits a new object.
Replaces the underlying RDD and SequenceDictionary and emits a new object.
New RDD to replace current RDD.
New sequence dictionary to replace current dictionary.
Returns a new AlignmentRecordRDD.
Performs a broadcast right outer join between this RDD and another RDD.
Performs a broadcast right outer join between this RDD and another RDD.
In a broadcast join, the left RDD (this RDD) is collected to the driver,
and broadcast to all the nodes in the cluster. The key equality function
used for this join is the reference region overlap function. Since this
is a right outer join, all values in the left RDD that do not overlap a
value from the right RDD are dropped. If a value from the right RDD does
not overlap any values in the left RDD, it will be paired with a None
in the product of the join.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the right RDD that did not overlap a key in the left RDD.
Performs a sort-merge right outer join between this RDD and another RDD.
Performs a sort-merge right outer join between this RDD and another RDD.
In a sort-merge join, both RDDs are co-partitioned and sorted. The
partitions are then zipped, and we do a merge join on each partition.
The key equality function used for this join is the reference region
overlap function. Since this is a right outer join, all values in the
left RDD that do not overlap a value from the right RDD are dropped.
If a value from the right RDD does not overlap any values in the left
RDD, it will be paired with a None
in the product of the join.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, and all keys from the right RDD that did not overlap a key in the left RDD.
Performs a sort-merge right outer join between this RDD and another RDD, followed by a groupBy on the left value, if not null.
Performs a sort-merge right outer join between this RDD and another RDD, followed by a groupBy on the left value, if not null.
In a sort-merge join, both RDDs are co-partitioned and sorted. The
partitions are then zipped, and we do a merge join on each partition.
The key equality function used for this join is the reference region
overlap function. In the same operation, we group all values by the left
item in the RDD. Since this is a right outer join, all values from the
right RDD who did not overlap a value from the left RDD are placed into
a length-1 Iterable with a None
key.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, grouped together by the value they overlapped in the left RDD, and all values from the right RDD that did not overlap an item in the left RDD.
Saves this RDD to disk, with the type identified by the extension.
Saves this RDD to disk, with the type identified by the extension.
Path to save the file at.
Whether the file is sorted or not.
Returns true if saving succeeded.
Saves AlignmentRecords as a directory of Parquet files or as SAM/BAM.
Saves AlignmentRecords as a directory of Parquet files or as SAM/BAM.
This method infers the output format from the file extension. Filenames ending in .sam/.bam are saved as SAM/BAM, and all other files are saved as Parquet.
Save configuration arguments.
If the output is sorted, this will modify the SAM/BAM header.
Returns true if saving succeeded.
Saves reads in FASTQ format.
Saves reads in FASTQ format.
Path to save files at.
Optional second path for saving files. If set, two files will be saved.
If true, writes out reads with the base qualities from the original qualities (SAM "OQ") field. If false, writes out reads with the base qualities from the qual field. Default is false.
Whether to sort the FASTQ files by read name or not. Defaults to false. Sorting the output will recover pair order, if desired.
Iff strict, throw an exception if any read in this RDD is not accompanied by its mate.
An optional persistance level to set. If this level is set, then reads will be cached (at the given persistance) level between passes.
Saves these AlignmentRecords to two FASTQ files.
Saves these AlignmentRecords to two FASTQ files.
The files are one for the first mate in each pair, and the other for the second mate in the pair.
Path at which to save a FASTQ file containing the first mate of each pair.
Path at which to save a FASTQ file containing the second mate of each pair.
If true, writes out reads with the base qualities from the original qualities (SAM "OQ") field. If false, writes out reads with the base qualities from the qual field. Default is false.
Iff strict, throw an exception if any read in this RDD is not accompanied by its mate.
An optional persistance level to set. If this level is set, then reads will be cached (at the given persistance) level between passes.
Saves this RDD to disk as a Parquet file.
Saves this RDD to disk as a Parquet file.
Path to save the file at.
Saves this RDD to disk as a Parquet file.
Saves this RDD to disk as a Parquet file.
Path to save the file at.
Size per block.
Size per page.
Name of the compression codec to use.
Whether or not to disable bit-packing.
Saves this RDD to disk as a Parquet file.
Saves this RDD to disk as a Parquet file.
Path to save the file at.
Size per block.
Size per page.
Name of the compression codec to use.
Whether or not to disable bit-packing. Default is false.
Saves RDD as a directory of Parquet files.
Saves RDD as a directory of Parquet files.
The RDD is written as a directory of Parquet files, with Parquet configuration described by the input param args. The provided sequence dictionary is written at args.outputPath/_seqdict.avro as Avro binary.
Save configuration arguments.
Saves this RDD to disk as a SAM/BAM/CRAM file.
Saves this RDD to disk as a SAM/BAM/CRAM file.
Path to save the file at.
The SAMFormat to save as. If left null, we will infer the format from the file extension.
If true, saves output as a single file.
If the output is sorted, this will modify the header.
Saves an RDD of ADAM read data into the SAM/BAM format.
Saves an RDD of ADAM read data into the SAM/BAM format.
Path to save files to.
Selects whether to save as SAM, BAM, or CRAM. The default value is None, which means the file type is inferred from the extension.
If true, saves output as a single file.
If the output is sorted, this will modify the header.
If true and asSingleFile is true, we will save the output shards as a headerless file, but we will not merge the shards.
Converts an RDD into the SAM spec string it represents.
Converts an RDD into the SAM spec string it represents.
This method converts an RDD of AlignmentRecords back to an RDD of SAMRecordWritables and a SAMFileHeader, and then maps this RDD into a string on the driver that represents this file in SAM.
A string on the driver representing this RDD of reads in SAM format.
Saves Avro data to a Hadoop file system.
Saves Avro data to a Hadoop file system.
This method uses a SparkContext to identify our underlying file system, which we then save to.
Frustratingly enough, although all records generated by the Avro IDL compiler have a static SCHEMA$ field, this field does not belong to the SpecificRecordBase abstract class, or the SpecificRecord interface. As such, we must force the user to pass in the schema.
The type of the specific record we are saving.
Path to save records to.
SparkContext used for identifying underlying file system.
Schema of records we are saving.
Seq of records we are saving.
Called in saveAsParquet after saving RDD to Parquet to save metadata.
Called in saveAsParquet after saving RDD to Parquet to save metadata.
Writes any necessary metadata to disk. If not overridden, writes the sequence dictionary to disk as Avro.
Saves an RDD of Avro data to Parquet.
Saves an RDD of Avro data to Parquet.
The path to save the file to.
The size in bytes of blocks to write.
The size in bytes of pages to write.
The compression codec to apply to pages.
If false, dictionary encoding is used. If true, delta encoding is used.
The schema to set.
Performs a sort-merge inner join between this RDD and another RDD.
Performs a sort-merge inner join between this RDD and another RDD.
In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space.
Performs a sort-merge inner join between this RDD and another RDD, followed by a groupBy on the left value.
Performs a sort-merge inner join between this RDD and another RDD, followed by a groupBy on the left value.
In a sort-merge join, both RDDs are co-partitioned and sorted. The partitions are then zipped, and we do a merge join on each partition. The key equality function used for this join is the reference region overlap function. Since this is an inner join, all values who do not overlap a value from the other RDD are dropped. In the same operation, we group all values by the left item in the RDD.
The right RDD in the join.
Returns a new genomic RDD containing all pairs of keys that overlapped in the genomic coordinate space, grouped together by the value they overlapped in the left RDD..
Sorts our genome aligned data by reference positions, with contigs ordered by index.
Sorts our genome aligned data by reference positions, with contigs ordered by index.
Returns a new RDD containing sorted data.
Does not support data that is unaligned or where objects align to multiple positions.
sortLexicographically
Sorts our genome aligned data by reference positions, with contigs ordered lexicographically.
Sorts our genome aligned data by reference positions, with contigs ordered lexicographically.
Returns a new RDD containing sorted data.
Does not support data that is unaligned or where objects align to multiple positions.
sort
Sorts our read data by reference positions, with contigs ordered by name.
Sorts our read data by reference positions, with contigs ordered by name.
Sorts reads by the location where they are aligned. Unaligned reads are put at the end and sorted by read name. Contigs are ordered lexicographically.
Returns a new RDD containing sorted reads.
sortReadsByReferencePositionAndIndex
Sorts our read data by reference positions, with contigs ordered by index.
Sorts our read data by reference positions, with contigs ordered by index.
Sorts reads by the location where they are aligned. Unaligned reads are put at the end and sorted by read name. Contigs are ordered by index that they are ordered in the SequenceDictionary.
Returns a new RDD containing sorted reads.
sortReadsByReferencePosition
Converts this set of reads into a corresponding CoverageRDD.
Converts this set of reads into a corresponding CoverageRDD.
Determines whether to merge adjacent coverage elements with the same score a single coverage.
CoverageRDD containing mapped RDD of Coverage.
Convert this set of reads into fragments.
Convert this set of reads into fragments.
Returns a FragmentRDD where all reads have been grouped together by the original sequence fragment they come from.
Applies a function that transforms the underlying RDD into a new RDD.
Applies a function that transforms the underlying RDD into a new RDD.
A function that transforms the underlying RDD.
A new RDD where the RDD of genomic data has been replaced, but the metadata (sequence dictionary, and etc) is copied without modification.