how to run FacetsSuite wrapper scripts on command line
1
0
Entering edit mode
11 months ago
Dalal • 0

Hi,

I am very new to using FACETS. I was wondering if there is a way to run the Rscript snp-pile-wrapper.R directly on the command line without installing facets using conda or from GitHub. Is this possible? I've tried running this using the following example command provided at https://github.com/mskcc/facets-suite#, substituting the arguments with the actual paths to my files and chosen prefixes:

snp-pileup-wrapper.R \
    --snp-pileup-path <path to snp-pileup executable> \
    --vcf-file <path to SNP VCF> \
    --normal-bam normal.bam \
    --tumor-bam tumor.bam \
    --output-prefix <prefix for output file, preferrably tumorSample__normalSample>

However, I get the following error:

'snp-pileup-wrapper.R: command not found'

The Rscript is located within the path supplied after --snp-pileup-path.

facets-suite facets • 1.4k views
ADD COMMENT
0
Entering edit mode

Do you have R installed (and argparse library)?

Rscript --vanilla your_command_line
ADD REPLY
0
Entering edit mode

Thanks for your response. Yes I have R and argparse package installed.

Using your suggested command outputs the error:

'sh: 1: /home/dalal/mut_analysis/variant-calling/facets_cnv/: Permission denied'

I have write and execute permissions to this directory.

ADD REPLY
0
Entering edit mode

Your command line must have an incorrect option. Can you provide your command line (obfuscate any real names if you want).

ADD REPLY
0
Entering edit mode

This is the code I ran:

Rscript --vanilla snp-pileup-wrapper.R --snp-pileup-path ~/mut_analysis/variant-calling/facets_cnv/ --vcf-file ~/mut_analysis/hg38/annotations/dbsnp_146.hg38.vcf.gz --normal-bam ~/bam/006_normal/006_normal.clean.bam --tumor-bam ~/bam/006_met/006_met.clean.bam --output-prefix 006_met__006_normal
ADD REPLY
0
Entering edit mode
11 months ago

snp-pileup-wrapper.R: command not found

Have you put snp-pileup-wrapper.R in a directory on your PATH and, just in case, make it executable first with

chmod a+x snp-pileup-wrapper.R

If it is not on your PATH, then you need either

./snp-pileup-wrapper.R --foo --bar ...

(note ./) if the script is in your current directory. Or use the full path:

/full/path/to/snp-pileup-wrapper.R --foo --bar ...

As an aside, a while back I happen to write a wrapper for snp-pileup and facets. If any useful, it's on github cnv_facets.

ADD COMMENT
0
Entering edit mode

Hello, thanks for your reply and for kindly directing me to your GitHub page. Unfortunately I've tried installing cnv_facets via conda prior to this and it has taken a very long time at solving environment.

snp-pileup-wrapper.R is in my current directory. I've also ensured that the script is executable:

chmod a+x snp-pileup-wrapper.R

./snp-pileup-wrapper.R --foo --bar --snp-pileup-path ~/mut_analysis/variant-calling/facets_cnv/ --vcf-file ~/mut_analysis/hg38/annotations/dbsnp_146.hg38.vcf.gz --normal-bam ~/bam/006_normal/006_normal.clean.bam --tumor-bam ~/bam/006_met/006_met.clean.bam --output-prefix 006_met__006_normal

usage: ./snp-pileup-wrapper.R [-h] [-v] [-sp SNP_PILEUP_PATH] -vcf VCF_FILE -n NORMAL_BAM -t TUMOR_BAM -o OUTPUT_PREFIX [-p PSEUDO_SNPS] [-d MAX_DEPTH] ./snp-pileup-wrapper.R: error: unrecognized arguments: --foo --bar

I am probably inputting the incorrect commands at this point.

ADD REPLY
0
Entering edit mode

You need to replace -foo --bar with real options for the script. Those dummy names were just a demonstration of how you will provide those options.

ADD REPLY
0
Entering edit mode

I apologise for that. Unfortunately I am still left with the same error:

sh: 1: ~/mut_analysis/variant-calling/facets_cnv/: Permission denied

ADD REPLY
0
Entering edit mode

The link in your original post has this bit of help

--snp-pileup-path <path to snp-pileup executable>

So the path you provide needs to contain this executable. Do you have that in that directory?

ADD REPLY
0
Entering edit mode

Yes, the executable snp-pileup-wrapper.R is found in the path directory provided.

pwd

/home/dalal/mut_analysis/variant-calling/facets_cnv

ls -ltrh

total 28K -rw-rw-r-- 1 dalal dalal 15K May 24 19:59 run-facets-wrapper.R -rw-rw-r-- 1 dalal dalal 5.2K May 24 20:00 annotate-maf-wrapper.R -rwxrwxr-x 1 dalal dalal 2.3K May 24 20:47 snp-pileup-wrapper.R

ADD REPLY
0
Entering edit mode

Unfortunately the vignette is not very clear. It appears that you need to compile a program called snp-pileup and have it available in the directory that you are providing above.

Instructions to do the compilation are buried in the extcode directory from the facets program bundle: https://github.com/mskcc/facets/tree/master/inst/extcode

Please check the readme.txt file there.

ADD REPLY

Login before adding your answer.

Traffic: 2653 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6