UCSC-LoweLab / tRAX

tRNA Analysis of eXpression
GNU General Public License v3.0
9 stars 5 forks source link

IOError: [Errno 2] No such file or directory: 'TestTrnas/TestTrnas-SizeFactors.txt' #2

Closed windtalker6 closed 3 years ago

windtalker6 commented 5 years ago

I'm running the command in the TestRun.bash script, like this: ./processsamples.py --experimentname=TestTrnas --databasename=hg19 --samplefile=TestSamples.txt --ensemblgtf=hg19-genes.gtf

then I got this error:

$./processsamples.py --experimentname=TestTrnas --databasename=hg19 --samplefile=TestSamples.txt --ensemblgtf=hg19-genes.gtf Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX/checkRmodules.R Mapping Reads Mapping SRR029131 Mapping SRR029124 Mapping SRR207111 Mapping SRR207116 Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//featuretypes.R TestTrnas/TestTrnas-mapinfo.txt TestTrnas/TestTrnas-mapinfo.pdf Counting Reads Analyzing counts Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//analyzecounts.R TestTrnas TestTrnas/TestTrnas-counts.txt TestSamples.txt R script /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//analyzecounts.R failed Check Rlog.txt for details Counting Read Types Traceback (most recent call last): File "./processsamples.py", line 429, in counttypes(samplefilename, trnainfo,expinfo, ensgtf, bedfiles, ignoresizefactors = nosizefactors) File "./processsamples.py", line 147, in counttypes countreadtypes.main(sizefactors=expinfo.sizefactors,combinereps= True ,samplefile=samplefile,maturetrnas=[trnainfo.maturetrnas],trnatable=trnainfo.trnatable,trnaaminofile=expinfo.trnaaminofile,ensemblgtf=ensgtf,trnaloci=[trnainfo.locifile],countfile=expinfo.genetypecounts,realcountfile=expinfo.genetyperealcounts,bedfile= bedfiles,readlengthfile = expinfo.trnalengthfile ) File "/mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX/countreadtypes.py", line 28, in main sizefactor = getsizefactors(argdict["sizefactors"]) File "/mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX/trnasequtils.py", line 379, in getsizefactors sizefactorfile = open(sizefactorfile) IOError: [Errno 2] No such file or directory: 'TestTrnas/TestTrnas-SizeFactors.txt'

as the "TestTrnas/*" files are generated by "./processsamples.py" itself, so I don't know how to fix this.

windtalker6 commented 5 years ago

then, if I run it like this:

./processsamples.py --experimentname=TestTrnas --databasename=hg19 --samplefile=TestSamples.txt --ensemblgtf=hg19-genes.gtf --olddeseq

I got this error:

R script /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//deseq1.R failed

Fatal error: cannot open file '/mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//deseq1.R': No such file or directory

andrewdholmes commented 5 years ago

There should be an "Rlog.txt" file in the directory that includes an error message, could you give me that?

windtalker6 commented 5 years ago

This is the context of "Rlog.txt" file:

Loading required package: S4Vectors Loading required package: stats4 Loading required package: BiocGenerics Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

expand.grid

Loading required package: IRanges Loading required package: GenomicRanges Loading required package: GenomeInfoDb Loading required package: SummarizedExperiment Loading required package: Biobase Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: DelayedArray Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

anyMissing, rowMedians

Loading required package: BiocParallel

Attaching package: 'DelayedArray'

The following objects are masked from 'package:matrixStats':

colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following objects are masked from 'package:base':

aperm, apply, rowsum

Warning message: package 'matrixStats' was built under R version 3.6.1

Attaching package: 'plyr'

The following object is masked from 'package:matrixStats':

count

The following object is masked from 'package:IRanges':

desc

The following object is masked from 'package:S4Vectors':

rename

Attaching package: 'gridExtra'

The following object is masked from 'package:Biobase':

combine

The following object is masked from 'package:BiocGenerics':

combine

Saving 7 x 7 in image Loading required package: S4Vectors Loading required package: stats4 Loading required package: BiocGenerics Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which, which.max, which.min

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

expand.grid

Loading required package: IRanges Loading required package: GenomicRanges Loading required package: GenomeInfoDb Loading required package: SummarizedExperiment Loading required package: Biobase Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: DelayedArray Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

anyMissing, rowMedians

Loading required package: BiocParallel

Attaching package: 'DelayedArray'

The following objects are masked from 'package:matrixStats':

colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following objects are masked from 'package:base':

aperm, apply, rowsum

Warning message: package 'matrixStats' was built under R version 3.6.1 estimating size factors estimating dispersions Error in checkForExperimentalReplicates(object, modelMatrix) :

The design matrix has the same number of samples and coefficients to fit, so estimation of dispersion is not possible. Treating samples as replicates was deprecated in v1.20 and no longer supported since v1.22.

Calls: DESeq ... estimateDispersions -> .local -> checkForExperimentalReplicates Execution halted


Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX/checkRmodules.R


Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//featuretypes.R TestTrnas/TestTrnas-mapinfo.txt TestTrnas/TestTrnas-mapinfo.pdf


Rscript /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//analyzecounts.R TestTrnas TestTrnas/TestTrnas-counts.txt TestSamples.txt /mnt/lustre/user/wubin/01.Program/Scripts/02.software/tRAX//analyzecounts.R failed

andrewdholmes commented 5 years ago

Alright it looks like recent DESeq2 has made changes so it breaks the current version. I've fixed it so it should work with --olddeseq, and I'll work on a way to fix it for the DESeq2 default later.

If you get further problems you might also need to update pysam since I had to update that as well.

Let me know if you still have problems after that.

windtalker6 commented 5 years ago

"--olddeseq" won't help, the program can find Deseq1.R script, actually, there's no " Deseq1.R" file in the package

andrewdholmes commented 5 years ago

I added to the version I just pushed, if you pull it again it should be there.

windtalker6 commented 5 years ago

Thanks a lot!