haircutwrap.get.cut.statistics: Compute descriptive statistics that are used to calculate the...

Description Usage Examples

View source: R/haircut.fun.R

Description

Compute descriptive statistics that are used to calculate the call probability

Usage

1
2
haircutwrap.get.cut.statistics(indir, par, outdir = indir, batch.n = NA,
  batch.id = NA)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
#	within R
#
## Not run: 
#DATA	<- SET THIS DIRECTORY
indir	<- paste(DATA, 'contigs_150408_wref', sep='/' )
outdir	<- paste(DATA, 'contigs_150408_wref_cutstat', sep='/' )		
par		<- c('FRQx.quantile'=NA, 'FRQx.thr'=NA, 'CNS_FRQ.window'=200, 'CNS_AGR.window'=200, 'GPS.window'=200)
haircutwrap.get.cut.statistics(indir, par, outdir=outdir)	

## End(Not run)
#
#	run from command line 
#	this produces a command line string that can be run in UNIX alikes
#
## Not run: 
	
#DATA		<- SET THIS DIRECTORY
indir	<- paste(DATA, 'contigs_150408_wref', sep='/' )
outdir	<- paste(DATA, 'contigs_150408_wref_cutstat', sep='/' )		
cmd		<- cmd.haircut.cutstat(indir, outdir)
cat(cmd)

## End(Not run)
#
#	create multiple runs on HPC using the command line version
#
## Not run: 
	
#DATA		<- SET THIS DIRECTORY
indir		<- paste(DATA, 'contigs_150408_wref', sep='/' )
outdir		<- paste(DATA, 'contigs_150408_wref_cutstat', sep='/' )		
batch.n		<- 200
tmp			<- data.table(FILE=list.files(indir, pattern='fasta$', recursive=T))
tmp[, BATCH:= ceiling(seq_len(nrow(tmp))/batch.n)]
tmp			<- tmp[, max(BATCH)]
for(batch.id in seq.int(1,tmp))
{			
	cmd			<- cmd.haircut.cutstat(indir, outdir, batch.n=batch.n, batch.id=batch.id)
	cmd			<- cmd.hpcwrapper(cmd, hpc.nproc= 1, hpc.q='pqeelab', hpc.walltime=4, hpc.mem="5000mb")
	cat(cmd)		
	cmd.hpccaller(paste(DATA,"tmp",sep='/'), paste("hrct",paste(strsplit(date(),split=' ')[[1]],collapse='_',sep=''),sep='.'), cmd)	
}	
quit("no")	

## End(Not run)

olli0601/PANGEAhaircut documentation built on May 24, 2019, 12:52 p.m.