Danis102 / seqpac

seqpac - A Framework for small RNA analysis in R using Sequence-Based Counts
7 stars 0 forks source link

PAC_mapper #28

Open signeskog opened 3 years ago

signeskog commented 3 years ago

PAC_mapper with mapper="reanno" throws error:

Error in do.call("rbind", strsplit(nams, "\\d_\\("))[, 2] : 
  subscript out of bounds

tried running a few parts of splt_x list at random but couldn't find any that was TRUE in "(sum(type_test1, type_test2) == 2)" to test the error in closer detail.

PAC_mapper with mapper="vmatch" works.

code ran:


pac_t<-PAC_filter(pac_m, anno_target = list("Biotypes_mis0", c("tRNA", "Mt_tRNA")))

ref<-"C:/Users/sigsk47/Documents/PhD/R/Genomes/Drosophila_melanogaster/Drosophila_melanogaster/tRNA/tRNA/tRNA.fa"

map_o<-PAC_mapper(pac_t, ref=ref, N_up="NNN", N_down = "NNN", mapper="reanno", mismatches=0, threads=2, report_string=TRUE)

reference have Bowtie indexes

Danis102 commented 3 years ago

Have done some updates to PAC_mapper that might have solved this problem. I can't, however, reproduce your error. Thus it is difficult for me to confirm that this problem has been resolved. Do you keep having this error?

signeskog commented 3 years ago

The error is still there now with the latest version (f3e8eb4). It also says I have no bowtie indexes in the start of the function, but I have all bowtie indexes in the same folder as fasta file (all named after the fasta file too). Additionally, now "vmatch" also throws error; " Error in summary.connection(connection) : invalid connection", independent of how many threads I run at

signeskog commented 3 years ago

I used three different references, one from the old Linux computer (unsure of origin), one from GtRNAdb, one where tRNAs from Ensembl ncRNA were isolated and they all gave this result. Although, using the one from FlyBase worked, so this error may be due to the different structures of references?

I can run the code without problem with all references if I remove the if(sum(type_test1,typetest2)==")-part, and only keep the else-statement afterwards. The problem stems in when I have a tRNA name that exists in 2 forms (for example tRNA-Pro-TGG-1-1 and tRNA-Pro-TGG-1-2) and it enters that part of the if-statement, as there's no information to retrieve in do.call("rbind", strsplit(nams, "\d\("))[,2] (that object only have one column). I can't read from the code what information strnd_ref is supposed to collect.

Danis102 commented 3 years ago

I believe this should have been solved now in the development branch. Please, come back to me if you keep having this problem.