Biowulf High Performance Computing at the NIH
Scramble: a tool for mobile element insertion detection

Scramble is a mobile element insertion (MEI) detection tool. It identifies clusters of soft clipped reads in a BAM file, builds consensus sequences, aligns to representative L1Ta, AluYa5, and SVA-E sequences, and outputs MEI calls.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf ~]$ sinteractive --mem=4g
salloc.exe: Pending job allocation 56730292
salloc.exe: job 56730292 queued and waiting for resources
salloc.exe: job 56730292 has been allocated resources
salloc.exe: Granted job allocation 56730292
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3148 are ready for job
[user@cn3148 ~]$ module load Scramble 
[+] Loading singularity  3.5.3  on cn3148
[+] Loading Scramble 0.0.20190211.82c78b9  ...
Copy sample data into your current directory:
[user@cn3148 ~]$ cp $SCRAMBLE_DATA/* .
You can run Scramble in two different ways.

1) When you execute the scramble command without arguments, a new shell is opened for you within a Singularity container:
[user@cn3148 ~]$ scramble
Singularity>
Your environment will change and you will have access to a different set of commands and executables. For example, you can run the command:
Singularity>  Rscript --vanilla /app/cluster_analysis/bin/SCRAMble-MEIs.R --out-name ${PWD}/sample.mei.txt --cluster-file ${PWD}/sample_cluster.txt --install-dir /app/cluster_analysis/bin --mei-refs /app/cluster_analysis/resources/MEI_consensus_seqs.fa  

Running sample: /data/user/sample_cluster.txt
Running scramble with options:
clusterFile : /data/user/sample_cluster.txt
INSTALL.DIR : /app/cluster_analysis/bin
mei.refs : /app/cluster_analysis/resources/MEI_consensus_seqs.fa
meiScore : 50
nCluster : 5
outFile : /data/user/sample.mei.txt
pctAlign : 70
polyAdist : 200
polyAFrac : 0.5
Useful Functions Loaded
Loading required package: methods
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, cbind, colMeans, colnames,
    colSums, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match,
    mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rowMeans, rownames, rowSums, sapply, setdiff, sort,
    table, tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: ‘Biostrings’

The following object is masked from ‘package:base’:

    strsplit

Done analyzing l1
Done analyzing sva
Done analyzing alu
Done analyzing l1
Done analyzing sva
Done analyzing alu
Sample had 1 MEI(s)
Done analyzing MEIs
Please remember to exit this new shell when you are finished with your session.
Singularity> exit
exit
[user@cn3148]$

2) Alternatively, you can run the Rscript or other command(s) directly from the Linux shell, but in this case the command(s) must be preceded by scramble. For example:
[user@cn3148 ~]$ scramble Rscript --vanilla /app/cluster_analysis/bin/SCRAMble-MEIs.R --out-name ${PWD}/sample.mei.txt --cluster-file ${PWD}/sample_cluster.txt --install-dir /app/cluster_analysis/bin --mei-refs /app/cluster_analysis/resources/MEI_consensus_seqs.fa

Running sample: /data/user/sample_cluster.txt
Running scramble with options:
clusterFile : /data/user/sample_cluster.txt
INSTALL.DIR : /app/cluster_analysis/bin
mei.refs : /app/cluster_analysis/resources/MEI_consensus_seqs.fa
meiScore : 50
nCluster : 5
outFile : /data/user/sample.mei.txt
pctAlign : 70
polyAdist : 200
polyAFrac : 0.5
Useful Functions Loaded
Loading required package: methods
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, cbind, colMeans, colnames,
    colSums, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match,
    mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rowMeans, rownames, rowSums, sapply, setdiff, sort,
    table, tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: ‘Biostrings’

The following object is masked from ‘package:base’:

    strsplit

Done analyzing l1
Done analyzing sva
Done analyzing alu
Done analyzing l1
Done analyzing sva
Done analyzing alu
Sample had 1 MEI(s)
Done analyzing MEIs
Exit the interactive shell:
[user@cn3148 ~]$ exit
exit
salloc.exe: Relinquishing job allocation 49998864
[user@biowulf ~]$