1 <?php
namespace HL7\FHIR\STU3\FHIRResource\FHIRSequence
;
4 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
5 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
7 * Class creation date: February 10th, 2018
10 use HL7\FHIR\STU3\FHIRElement\FHIRBackboneElement
;
13 * Raw data describing a biological sequence.
15 class FHIRSequenceVariant
extends FHIRBackboneElement
implements \JsonSerializable
18 * Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
19 * @var \HL7\FHIR\STU3\FHIRElement\FHIRInteger
24 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
25 * @var \HL7\FHIR\STU3\FHIRElement\FHIRInteger
30 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
31 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
33 public $observedAllele = null;
36 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
37 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
39 public $referenceAllele = null;
42 * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
43 * @var \HL7\FHIR\STU3\FHIRElement\FHIRString
48 * A pointer to an Observation containing variant information.
49 * @var \HL7\FHIR\STU3\FHIRElement\FHIRReference
51 public $variantPointer = null;
56 private $_fhirElementName = 'Sequence.Variant';
59 * Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
60 * @return \HL7\FHIR\STU3\FHIRElement\FHIRInteger
62 public function getStart()
68 * Start position of the variant on the reference sequence.If the coordinate system is either 0-based or 1-based, then start position is inclusive.
69 * @param \HL7\FHIR\STU3\FHIRElement\FHIRInteger $start
72 public function setStart($start)
74 $this->start
= $start;
79 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
80 * @return \HL7\FHIR\STU3\FHIRElement\FHIRInteger
82 public function getEnd()
88 * End position of the variant on the reference sequence.If the coordinate system is 0-based then end is is exclusive and does not include the last position. If the coordinate system is 1-base, then end is inclusive and includes the last position.
89 * @param \HL7\FHIR\STU3\FHIRElement\FHIRInteger $end
92 public function setEnd($end)
99 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
100 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
102 public function getObservedAllele()
104 return $this->observedAllele
;
108 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the observed sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
109 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $observedAllele
112 public function setObservedAllele($observedAllele)
114 $this->observedAllele
= $observedAllele;
119 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
120 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
122 public function getReferenceAllele()
124 return $this->referenceAllele
;
128 * An allele is one of a set of coexisting sequence variants of a gene ([SO:0001023](http://www.sequenceontology.org/browser/current_svn/term/SO:0001023)). Nucleotide(s)/amino acids from start position of sequence to stop position of sequence on the positive (+) strand of the reference sequence. When the sequence type is DNA, it should be the sequence on the positive (+) strand. This will lay in the range between variant.start and variant.end.
129 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $referenceAllele
132 public function setReferenceAllele($referenceAllele)
134 $this->referenceAllele
= $referenceAllele;
139 * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
140 * @return \HL7\FHIR\STU3\FHIRElement\FHIRString
142 public function getCigar()
148 * Extended CIGAR string for aligning the sequence with reference bases. See detailed documentation [here](http://support.illumina.com/help/SequencingAnalysisWorkflow/Content/Vault/Informatics/Sequencing_Analysis/CASAVA/swSEQ_mCA_ExtendedCIGARFormat.htm).
149 * @param \HL7\FHIR\STU3\FHIRElement\FHIRString $cigar
152 public function setCigar($cigar)
154 $this->cigar
= $cigar;
159 * A pointer to an Observation containing variant information.
160 * @return \HL7\FHIR\STU3\FHIRElement\FHIRReference
162 public function getVariantPointer()
164 return $this->variantPointer
;
168 * A pointer to an Observation containing variant information.
169 * @param \HL7\FHIR\STU3\FHIRElement\FHIRReference $variantPointer
172 public function setVariantPointer($variantPointer)
174 $this->variantPointer
= $variantPointer;
181 public function get_fhirElementName()
183 return $this->_fhirElementName
;
189 public function __construct($data = [])
191 if (is_array($data)) {
192 if (isset($data['start'])) {
193 $this->setStart($data['start']);
195 if (isset($data['end'])) {
196 $this->setEnd($data['end']);
198 if (isset($data['observedAllele'])) {
199 $this->setObservedAllele($data['observedAllele']);
201 if (isset($data['referenceAllele'])) {
202 $this->setReferenceAllele($data['referenceAllele']);
204 if (isset($data['cigar'])) {
205 $this->setCigar($data['cigar']);
207 if (isset($data['variantPointer'])) {
208 $this->setVariantPointer($data['variantPointer']);
210 } else if (null !== $data) {
211 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
213 parent
::__construct($data);
219 public function __toString()
221 return $this->get_fhirElementName();
227 public function jsonSerialize()
229 $json = parent
::jsonSerialize();
230 if (isset($this->start
)) {
231 $json['start'] = $this->start
;
233 if (isset($this->end
)) {
234 $json['end'] = $this->end
;
236 if (isset($this->observedAllele
)) {
237 $json['observedAllele'] = $this->observedAllele
;
239 if (isset($this->referenceAllele
)) {
240 $json['referenceAllele'] = $this->referenceAllele
;
242 if (isset($this->cigar
)) {
243 $json['cigar'] = $this->cigar
;
245 if (isset($this->variantPointer
)) {
246 $json['variantPointer'] = $this->variantPointer
;
252 * @param boolean $returnSXE
253 * @param \SimpleXMLElement $sxe
254 * @return string|\SimpleXMLElement
256 public function xmlSerialize($returnSXE = false, $sxe = null)
259 $sxe = new \
SimpleXMLElement('<SequenceVariant xmlns="http://hl7.org/fhir"></SequenceVariant>');
261 parent
::xmlSerialize(true, $sxe);
262 if (isset($this->start
)) {
263 $this->start
->xmlSerialize(true, $sxe->addChild('start'));
265 if (isset($this->end
)) {
266 $this->end
->xmlSerialize(true, $sxe->addChild('end'));
268 if (isset($this->observedAllele
)) {
269 $this->observedAllele
->xmlSerialize(true, $sxe->addChild('observedAllele'));
271 if (isset($this->referenceAllele
)) {
272 $this->referenceAllele
->xmlSerialize(true, $sxe->addChild('referenceAllele'));
274 if (isset($this->cigar
)) {
275 $this->cigar
->xmlSerialize(true, $sxe->addChild('cigar'));
277 if (isset($this->variantPointer
)) {
278 $this->variantPointer
->xmlSerialize(true, $sxe->addChild('variantPointer'));
283 return $sxe->saveXML();