Variant annotation help - predictCoding error message
0
0
Entering edit mode
2.5 years ago
Rozita ▴ 40

Hi, I'm following the tutorial here to annotate my VCF files https://rockefelleruniversity.github.io/RU_GenomicVariants/presentations/singlepage/RU_GenomicVariant_session2.html#Predict_amino_acid_changes25

and I'm currently at the step where I'm supposed to run predictCoding to predict the amino acid changes that happen

So far, everything in the code has been fine except when I run this command:

coding <- predictCoding(vcf_chr1, txdb, seqSource = Hsapiens)

I get the following error message

Error in mergeNamedAtomicVectors(seqlengths(x), seqlengths(y), what = c("sequence", : sequence chrM has incompatible seqlengths:

  • in 'x': 16569
  • in 'y': 16571

I had initially subset chr1, so the VCF file should contain chr1 only so I'm finding it a bit odd that it says sequence chrM has incompatible seqlengths. Any idea what could be going wrong here?

Thank you.

VCF RStudio annotation variant proteinCoding • 1.2k views
ADD COMMENT
0
Entering edit mode

your VCF is using a reference for chrM that is not the same as used by your R lib.

see diferent contigs chrM

there are two common chrM, one with 16569bp (rCRS) and the other with 16571bp (GRCh37).

ADD REPLY
0
Entering edit mode

Thank you for the clarification. How can I best go about changing this? They both have the same seqlevelsStyle, genome, seqlevels. How do I ensure that they're both the same version / how do I change either of them (ideally the version for the txdb as I don't have access to the raw data to generate the vcf files to re-align them again)?

> seqlevelsStyle(HCC_Tissue_041_chr1)
[1] "UCSC"

> seqlevelsStyle(txdb)
[1] "UCSC"

> seqlevels(HCC_Tissue_041_chr1)
 [1] "chr1"  "chr2"  "chr3"  "chr4"  "chr5"  "chr6"  "chr7"  "chr8"  "chr9"  "chr10" "chr11" "chr12" "chr13" "chr14" "chr15"
[16] "chr16" "chr17" "chr18" "chr19" "chr20" "chr21" "chr22" "chrX"  "chrY"  "chrM" 

> seqlevels(txdb)
 [1] "chr1"                  "chr2"                  "chr3"                  "chr4"                  "chr5"                 
 [6] "chr6"                  "chr7"                  "chr8"                  "chr9"                  "chr10"                
[11] "chr11"                 "chr12"                 "chr13"                 "chr14"                 "chr15"                
[16] "chr16"                 "chr17"                 "chr18"                 "chr19"                 "chr20"                
[21] "chr21"                 "chr22"                 "chrX"                  "chrY"                  "chrM"                 
[26] "chr1_gl000191_random"  "chr1_gl000192_random"  "chr4_ctg9_hap1"        "chr4_gl000193_random"  "chr4_gl000194_random" 
[31] "chr6_apd_hap1"         "chr6_cox_hap2"         "chr6_dbb_hap3"         "chr6_mann_hap4"        "chr6_mcf_hap5"        
[36] "chr6_qbl_hap6"         "chr6_ssto_hap7"        "chr7_gl000195_random"  "chr8_gl000196_random"  "chr8_gl000197_random" 
[41] "chr9_gl000198_random"  "chr9_gl000199_random"  "chr9_gl000200_random"  "chr9_gl000201_random"  "chr11_gl000202_random"
[46] "chr17_ctg5_hap1"       "chr17_gl000203_random" "chr17_gl000204_random" "chr17_gl000205_random" "chr17_gl000206_random"
[51] "chr18_gl000207_random" "chr19_gl000208_random" "chr19_gl000209_random" "chr21_gl000210_random" "chrUn_gl000211"       
[56] "chrUn_gl000212"        "chrUn_gl000213"        "chrUn_gl000214"        "chrUn_gl000215"        "chrUn_gl000216"       
[61] "chrUn_gl000217"        "chrUn_gl000218"        "chrUn_gl000219"        "chrUn_gl000220"        "chrUn_gl000221"       
[66] "chrUn_gl000222"        "chrUn_gl000223"        "chrUn_gl000224"        "chrUn_gl000225"        "chrUn_gl000226"       
[71] "chrUn_gl000227"        "chrUn_gl000228"        "chrUn_gl000229"        "chrUn_gl000230"        "chrUn_gl000231"       
[76] "chrUn_gl000232"        "chrUn_gl000233"        "chrUn_gl000234"        "chrUn_gl000235"        "chrUn_gl000236"       
[81] "chrUn_gl000237"        "chrUn_gl000238"        "chrUn_gl000239"        "chrUn_gl000240"        "chrUn_gl000241"       
[86] "chrUn_gl000242"        "chrUn_gl000243"        "chrUn_gl000244"        "chrUn_gl000245"        "chrUn_gl000246"       
[91] "chrUn_gl000247"        "chrUn_gl000248"        "chrUn_gl000249" 

> genome(HCC_Tissue_041_chr1)
  chr1   chr2   chr3   chr4   chr5   chr6   chr7   chr8   chr9  chr10  chr11  chr12  chr13  chr14  chr15  chr16  chr17  chr18 
"hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" 
 chr19  chr20  chr21  chr22   chrX   chrY   chrM 
"hg19" "hg19" "hg19" "hg19" "hg19" "hg19" "hg19" 

> genome(txdb)
                 chr1                  chr2                  chr3                  chr4                  chr5 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
                 chr6                  chr7                  chr8                  chr9                 chr10 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
                chr11                 chr12                 chr13                 chr14                 chr15 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
                chr16                 chr17                 chr18                 chr19                 chr20 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
                chr21                 chr22                  chrX                  chrY                  chrM 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
 chr1_gl000191_random  chr1_gl000192_random        chr4_ctg9_hap1  chr4_gl000193_random  chr4_gl000194_random 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
        chr6_apd_hap1         chr6_cox_hap2         chr6_dbb_hap3        chr6_mann_hap4         chr6_mcf_hap5 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
        chr6_qbl_hap6        chr6_ssto_hap7  chr7_gl000195_random  chr8_gl000196_random  chr8_gl000197_random 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
 chr9_gl000198_random  chr9_gl000199_random  chr9_gl000200_random  chr9_gl000201_random chr11_gl000202_random 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
      chr17_ctg5_hap1 chr17_gl000203_random chr17_gl000204_random chr17_gl000205_random chr17_gl000206_random 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
chr18_gl000207_random chr19_gl000208_random chr19_gl000209_random chr21_gl000210_random        chrUn_gl000211 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000212        chrUn_gl000213        chrUn_gl000214        chrUn_gl000215        chrUn_gl000216 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000217        chrUn_gl000218        chrUn_gl000219        chrUn_gl000220        chrUn_gl000221 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000222        chrUn_gl000223        chrUn_gl000224        chrUn_gl000225        chrUn_gl000226 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000227        chrUn_gl000228        chrUn_gl000229        chrUn_gl000230        chrUn_gl000231 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000232        chrUn_gl000233        chrUn_gl000234        chrUn_gl000235        chrUn_gl000236 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000237        chrUn_gl000238        chrUn_gl000239        chrUn_gl000240        chrUn_gl000241 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000242        chrUn_gl000243        chrUn_gl000244        chrUn_gl000245        chrUn_gl000246 
               "hg19"                "hg19"                "hg19"                "hg19"                "hg19" 
       chrUn_gl000247        chrUn_gl000248        chrUn_gl000249 
               "hg19"                "hg19"                "hg19" 
ADD REPLY

Login before adding your answer.

Traffic: 2027 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6