alyssafrazee / polyester

Bioconductor package "polyester", devel version. RNA-seq read simulator.
http://biorxiv.org/content/early/2014/12/12/006015
89 stars 51 forks source link

simulate_experiment() fails when idfield (default: "transcript_id") is not present in the first line of the gtf file #68

Open alorchhota opened 4 years ago

alorchhota commented 4 years ago

simulate_experiment() fails whenidfield (dafault = "transcript_id") is not present in the first row (did not check later rows) of the gtf file. The error is, I believe, in the 2nd line of the following code, because getAttributeField() returns NA.

names(these_seqs) = getAttributeField(dftmp$attributes, idfield, attrsep = attrsep)
if (substr(names(these_seqs)[1], 1, 1) == "\"") {
        x = names(these_seqs)
        names(these_seqs) = substr(x, 2, nchar(x) - 1)
}