chainMergeSort: chainMergeSort

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/WholeGenomeAlignment.R

Description

Wrapper function of chainMergeSort: Combines sorted files into a larger sorted file. This function doesn't work on Windows platform since Kent utilities only support Linux and Unix platforms.

Usage

1
2
3
4
5
6
  chainMergeSort(chains, assemblyTarget, assemblyQuery,
                 allChain=paste0(sub("\\.2bit$", "", basename(assemblyTarget),
                                    ignore.case=TRUE), ".", 
                                 sub("\\.2bit$", "", basename(assemblyQuery), 
                                     ignore.case=TRUE), ".all.chain"),
                 removeChains=TRUE, binary="chainMergeSort")

Arguments

chains

character(n): file names of input chains files.

assemblyTarget

character(1): the file name of target assembly twoBit file.

assemblyQuery

character(1): the file name of query assembly twoBit file.

allChain

character(1): file names of merged allChain file.

removeChains

boolean: When TRUE, the input chains files will be removed after the conversion.

binary

character(1): the name/filename of the binary chainMergeSort to call.

Details

This allChain file is what we get from UCSC download, e.g., hg19.danRer7.all.chain.gz.

Value

character(1): the file names of merged allChain file.

Author(s)

Ge Tan

References

http://hgdownload.cse.ucsc.edu/admin/exe/

See Also

axtChain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  ## Not run: 
  ## This example doesn't run because it requires two bit files and external
  ## Kent utilities.
    chains <- tools::list_files_with_exts(
                dir="/Users/gtan/OneDrive/Project/CSC/CNEr/axt", exts="chain")
    assemblyTarget <- "/Users/gtan/OneDrive/Project/CSC/CNEr/2bit/danRer10.2bit"
    assemblyQuery <- "/Users/gtan/OneDrive/Project/CSC/CNEr/2bit/hg38.2bit"
    chainMergeSort(chains, assemblyTarget, assemblyQuery,
      allChain=file.path("/Users/gtan/OneDrive/Project/CSC/CNEr/axt",
                         paste0(sub("\\.2bit$", "", basename(assemblyTarget),
                                    ignore.case=TRUE), ".", 
                                sub("\\.2bit$", "", basename(assemblyQuery), 
                                    ignore.case=TRUE), ".all.chain")),
      removeChains=FALSE, binary="chainMergeSort")
  
## End(Not run)

CNEr documentation built on Nov. 8, 2020, 5:36 p.m.