Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

R script error #203

Open
GrubLord opened this issue Apr 21, 2016 · 3 comments
Open

R script error #203

GrubLord opened this issue Apr 21, 2016 · 3 comments

Comments

@GrubLord
Copy link

GrubLord commented Apr 21, 2016

Hi guys,

We've been experiencing a crash in genome/lib/perl/Genome/Model/ClinSeq/Command/SummarizeTier1SnvSupport.pm.R

The code where the script crashes is on the following line:
p = p + geom_vline(xintercept=xmedian, linetype=3, color="black", size=0.3) + geom_vline(xintercept=ymedian, linetype=3, color="black", size=0.3) + geom_vline(xintercept=zmedian, linetype=3, color="black", size=0.3)

The failure we observed looks as follows:
2016-04-18 07:08:40+0000 ip-172-31-39-11: Command module died or returned undef. 2016-04-18 07:08:40+0000 ip-172-31-39-11: ERROR RUNNING COMMAND. Exit code 1 from: /opt/gms/HQO1F136/sw/genome/lib/perl/Genome/Model/ClinSeq/Command/SummarizeTier1SnvSupport.pm.R /opt/gms/HQO1F136/fs/HQO1F136/info/model_data/954519835d8d43ef86b08beaf8e69312/build5ae4377ef0fe4654977d8e163eef9dfb/RA_001/snv/wgs/summary/ /opt/gms/HQO1F136/fs/HQO1F136/info/model_data/954519835d8d43ef86b08beaf8e69312/build5ae4377ef0fe4654977d8e163eef9dfb/RA_001/snv/wgs/snvs.hq.tier1.v1.annotated.compact.readcounts.tsv 1>/opt/gms/HQO1F136/fs/HQO1F136/info/model_data/954519835d8d43ef86b08beaf8e69312/build5ae4377ef0fe4654977d8e163eef9dfb/RA_001/snv/wgs/summary/rc_summary.stdout 2>/opt/gms/HQO1F136/fs/HQO1F136/info/model_data/954519835d8d43ef86b08beaf8e69312/build5ae4377ef0fe4654977d8e163eef9dfb/RA_001/snv/wgs/summary/rc_summary.stderr

And the R error log gives us:
Error in eval(expr, envir, enclos) : object 'xintercept' not found Calls: plotCoverageComparison ... by_layer -> f -> <Anonymous> -> f -> lapply -> FUN -> eval Execution halted

The stdout also contains the line [1] "Gene expression file not defined", but given this is WGS, this file should be optional and unnecessary.

Could you help us track down what's going on here, please? We believe that some additional validation or an extra conditional in the R script would address this issue, but we're not sure how to deal with it ourselves, and it is consistently crashing at that point.

@malachig
Copy link
Collaborator

The gene expression file not defined message is just a warning and it should not matter here. It doesn't seem like any of that block should be executed if you do not have all three data types.

It succeeds if you comment out that line?

To debug this, you can run the script standalone and supply the three input enumerated at the top of the script. You can use examples from the build that is failing and then iterate on the problem a bit quicker.

What do the rcs and classes objects look like (line 523).

classes = c(rep("WGS", length(x)), rep("Exome", length(y)), rep("RNAseq", length(z)))
rcs = data.frame(c(x,y,z), classes)

@GrubLord
Copy link
Author

Hi guys,

I was right, it's definitely the line I quoted of that file...

The problem seems to have been that ymedian and zmedian are NULL.

Doing this solved the issue:

if(!is.null(xmedian)){ p = p + geom_vline(xintercept=xmedian, linetype=3, color="black", size=0.3) } if(!is.null(ymedian)){ p = p + geom_vline(xintercept=ymedian, linetype=3, color="black", size=0.3) } if(!is.null(zmedian)){ p = p + geom_vline(xintercept=zmedian, linetype=3, color="black", size=0.3) }

@GrubLord
Copy link
Author

This is a stopgap, though: I would appreciate your feedback on what's causing this issue.

Cheers,

-- Liviu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants