Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # A test sample from TPO
  2. #gt <-'/hits_mctp/users/hopkinal/mioncoseq2/test/SI_12742_HL5KVBCXX_0-genotype.csv'
  3. #this will have to be adapted for Bob's geno output
  4.  
  5. #load the genotyping csv and alignstats file from TPO
  6. alignid <- gsub('-genotype.csv','',basename(gt))
  7. gtds <- read.csv(gt)
  8.  
  9.  
  10. #convert the hets to IUPAC i.e. A/C -> M
  11. gt <- as.character(gtds$final_call)
  12. gt <- gsub('/','',gt)
  13. gt <- gsub('UNKNOWN','ACGT',gt)
  14. dict = names(IUPAC_CODE_MAP)
  15. names(dict) = IUPAC_CODE_MAP
  16. gtt <- as.character(dict[gt])
  17. gtt <- paste(gtt, collapse='')
  18.  
  19. gtt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement