Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allele T gets converted to TRUE #13

Open
zx8754 opened this issue Sep 10, 2020 · 1 comment
Open

Allele T gets converted to TRUE #13

zx8754 opened this issue Sep 10, 2020 · 1 comment

Comments

@zx8754
Copy link

zx8754 commented Sep 10, 2020

Using command line:

# tabix (htslib) 1.9
$ tabix  myfile.gz 10:85547273-85547273 | cut -f1-5
# 10:85547273:C:T 10      85547273        C       T

vs using seqminer:

# seqminer_8.0
# R version 3.6.0 (2019-04-26)
# Platform: x86_64-pc-linux-gnu (64-bit)
# Running under: CentOS Linux 7 (Core)

tabixSubset <- tabix.read.table("myfile.gz", "10:85547273-85547273")
tabixSubset[, 1:5]
#               V1 V2       V3 V4   V5
#1 10:85547273:C:T 10 85547273  C TRUE
@asaksager
Copy link

This is still an issue.

My solution was to change it after extraction:

mysubset <- as_tibble(tabix.read.table("myfile.gz", "10:85547273-85547273")) %>% 
                      mutate(across(where(is.logical),as.character)) %>%   
                      mutate(across(.cols = everything(), .
                                    fns =~ str_replace_all(string =., pattern = "TRUE", replacement = "T")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants