Git Product home page Git Product logo

Comments (2)

knausb avatar knausb commented on June 13, 2024

I was unsuccessful at reproducing this behavior. I have created a unit test to validate that this works. The code for this test is as follows.

library(testthat)
library(vcfR)
data(vcfR_example)
vcf2 <- vcf[grep(",", vcf@fix[,'ALT']),]
gt <- extract.gt(vcf2, element="GT", return.alleles = TRUE, allele.sep="|")

# Locus 1: 0,1,2 = T,A,G
# 0|0
expect_equal( as.character(gt[1,'BL2009P4_us23']), "T|T")
# 0|1
expect_equal( as.character(gt[1,'DDR7602']), "T|A")
# 0|2
expect_equal( as.character(gt[1,'blue13']), "T|G")

# Locus 6: 0,1,2 = G,GTCTAATAGAGGCTCGAACTC,GTCTAATAGAGGCTCGAGCTC
# 0|2
expect_equal( as.character(gt[6,'BL2009P4_us23']), "G|GTCTAATAGAGGCTCGAGCTC")
# 1|2
expect_equal( as.character(gt[6,'DDR7602']), "GTCTAATAGAGGCTCGAACTC|GTCTAATAGAGGCTCGAGCTC" )

I'll leave this open for now in case we get an example that fails.

from vcfr.

knausb avatar knausb commented on June 13, 2024

This issue has been open for almost three months. I did not hear back from the reviewer or anyone else who could reproduce this issue. I'm therefore closing it.

from vcfr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.