Thank you, its correct. In my code I was using (https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_43/gencode.v43.primary_assembly.annotation.gtf.gz) not ("https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_43/gencode.v43.annotation.gtf.gz")
Based on what I red that gencode.vX.primary_assembly.annotation contains Gene annotation on reference chromosomes and scaffolds, and gencode.vX.annotation contains annotation (genes, transcripts, exons, start_codon, stop_codon, UTRs, CDS) on the reference chromosomes. what does it mean ?and what is the different? and which one shall be use for alignment process?? Thanks in advance
obj_43 is not defined in this code chunk which decreases my confidence in the result. Just count the unique gene IDs.
Hello, thanks for replying, by mistake I paste the wrong code. the following is the corrected
gtf_43<-rtracklayer::import('gencode.v43.primary_assembly.annotation.gtf') dtgtf_43<-data.frame(gtf_43) genes <- unique(dtgtf_43[ ,c("gene_id","gene_name")]) geneId <- unique(dtgtf_43[ ,c("gene_id")]) length(geneId) ## result 62757 nrow(genes) ## result
The following is the correct code
gtf_43<-rtracklayer::import('gencode.v43.primary_assembly.annotation.gtf') dtgtf_43<-data.frame(gtf_43) nrow(dtgtf_43) genes <- unique(dtgtf_43[ ,c("gene_id","gene_name")]) geneId <- unique(dtgtf_43[ ,c("gene_id")]) length(geneId) nrow(genes)