I solved my issue and it might be that others have the same problem.
I used the gencode GTF file (the first one) and the cDNA file for the Salmon quantification
The error seemed to come from the following code in the import_data.R:
| ### Test overlap with expression data |
| isoformCountMatrix$isoform_id, |
| isoformAnnotation$isoform_id |
)
Here, the isoform_id from the object created with importIsoformExpression matrices (such as counts) is compared with the one from the GTF file.
When I checked both, i noticed that the GTF file was imported correctly but the isoform_id in the count matrix had all the possible IDs jammed together in one column as such:
ENST00000467408.6|ENSG00000127054.20|OTTHUMG00000003330.13|OTTHUMT00000009378.2|INTS11-213|INTS11|639|retained_intron insteas of just the first value ENST00000467408.6
Looking around github I found this post in the issues:
https://github.com/kvittingseerup/IsoformSwitchAnalyzeR/issues/11user csijcs posted his solution to the problem. It might be that it was already implemented in the new devel version but if you are stuck with the 1.5 version, you should do the following:
mySwitchList <- importIsoformExpression(dir,
+ calculateCountsFromAbundance=TRUE,
+ interLibNormTxPM=TRUE,
+ normalizationMethod='TMM',
+ pattern='',
+ invertPattern=FALSE,
+ ignore.case=FALSE,
+ showProgress = TRUE,
+ quiet = TRUE
+ )
isoformCountMatrix <- mySwitchList$counts
isoformCountMatrix$isoform_id <- sub("\\|.*", "", isoformCountMatrix$isoform_id)
rownames(isoformCountMatrix) <- isoformCountMatrix$isoform_id
isoformAbundanceMatrix <- mySwitchList$abundance
isoformAbundanceMatrix$isoform_id <- sub("\\|.*", "", isoformAbundanceMatrix$isoform_id)
rownames(isoformAbundanceMatrix) <- isoformAbundanceMatrix$isoform_id
##path to your gtf file here
gtf <-("/Users/csijcs/Documents/Work/CSI/AML/RNA_seq/gencode.v28.annotation.gtf")
switchAnalyzeRlist <- importRdata(
isoformCountMatrix,
isoformAbundanceMatrix,
samples,
gtf,
comparisonsToMake=NULL,
addAnnotatedORFs=TRUE,
onlyConsiderFullORF=TRUE,
removeNonConvensionalChr=TRUE,
PTCDistance=50,
foldChangePseudoCount=0.01,
showProgress=TRUE,
quiet=FALSE
)
This worked for me, I hope it helps others