1.参考2中提高了具体的,cp过来:
{"readNum": null, "contig": null, "start": null, "oldPosition": null, "end": null, "mapq": null, "readName": "chrUn_KN707606v1_decoy_1204_1728_0:0:0_1:0:0_0", "sequence": "CTCCTCGCCA", "qual": "2222222222", "cigar": null, "oldCigar": null, "basesTrimmedFromStart": 0, "basesTrimmedFromEnd": 0, "readPaired": false, "properPair": null, "readMapped": false, "mateMapped": false, "failedVendorQualityChecks": false, "duplicateRead": false, "readNegativeStrand": null, "mateNegativeStrand": null, "primaryAlignment": null, "secondaryAlignment": null, "supplementaryAlignment": null, "mismatchingPositions": null, "origQual": null, "attributes": null, "recordGroupName": null, "recordGroupSequencingCenter": null, "recordGroupDescription": null, "recordGroupRunDateEpoch": null, "recordGroupFlowOrder": null, "recordGroupKeySequence": null, "recordGroupLibrary": null, "recordGroupPredictedMedianInsertSize": null, "recordGroupPlatform": null, "recordGroupPlatformUnit": null, "recordGroupSample": null, "mateAlignmentStart": null, "mateAlignmentEnd": null, "mateContig": null, "inferredInsertSize": null}
2.创建代码:
/** * @author xubo * FastqFormat read */ package org.bdgenomics.adamLocal.algorithms.test import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.bdgenomics.adam.rdd.ADAMContext import org.bdgenomics.formats.avro.AlignmentRecord object FastqFormat { def main(args: Array[String]) { val conf = new SparkConf().setAppName("FastaAndNucleotideContigFragment").setMaster("local") val sc = new SparkContext(conf) val ac = new ADAMContext(sc) val builder = AlignmentRecord.newBuilder() val fastq=builder.build() println(fastq); sc.stop } }
3.结果:
{"readNum": 0, "contig": null, "start": null, "oldPosition": null, "end": null, "mapq": null, "readName": null, "sequence": null, "qual": null, "cigar": null, "oldCigar": null, "basesTrimmedFromStart": 0, "basesTrimmedFromEnd": 0, "readPaired": false, "properPair": false, "readMapped": false, "mateMapped": false, "failedVendorQualityChecks": false, "duplicateRead": false, "readNegativeStrand": false, "mateNegativeStrand": false, "primaryAlignment": false, "secondaryAlignment": false, "supplementaryAlignment": false, "mismatchingPositions": null, "origQual": null, "attributes": null, "recordGroupName": null, "recordGroupSequencingCenter": null, "recordGroupDescription": null, "recordGroupRunDateEpoch": null, "recordGroupFlowOrder": null, "recordGroupKeySequence": null, "recordGroupLibrary": null, "recordGroupPredictedMedianInsertSize": null, "recordGroupPlatform": null, "recordGroupPlatformUnit": null, "recordGroupSample": null, "mateAlignmentStart": null, "mateAlignmentEnd": null, "mateContig": null, "inferredInsertSize": null}
参考:
【1】https://github.com/xubo245/AdamLearning
【2】http://blog.csdn.net/xubo245/article/details/51288264
【3】https://github.com/bigdatagenomics/adam