File: chainMergeSort.Rd

package info (click to toggle)
r-bioc-cner 1.26.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,216 kB
  • sloc: ansic: 23,458; makefile: 6
file content (77 lines) | stat: -rw-r--r-- 2,580 bytes parent folder | download | duplicates (4)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
\name{chainMergeSort}
\alias{chainMergeSort}

\title{
  chainMergeSort
}
\description{
  Wrapper function of \command{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{
  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{
  \item{chains}{
    \code{character}(n): file names of input \emph{chains} files.
  }
  \item{assemblyTarget}{
    \code{character}(1): the file name of target assembly \emph{twoBit} file.
  }
  \item{assemblyQuery}{
    \code{character}(1): the file name of query assembly \emph{twoBit} file.
  }
  \item{allChain}{
    \code{character}(1): file names of merged \emph{allChain} file.
  }
  \item{removeChains}{
    \code{boolean}: When \code{TRUE}, the input \emph{chains} files will be 
    removed after the conversion.
  }
  \item{binary}{
    \code{character}(1): the name/filename of the binary \command{chainMergeSort}
    to call.
  }
}
\details{
  This \emph{allChain} file is what we get from UCSC download, \emph{e.g.}, 
  \bold{hg19.danRer7.all.chain.gz}.
}
\value{
  \code{character}(1): the file names of merged \emph{allChain} file.
}
\references{
  \url{http://hgdownload.cse.ucsc.edu/admin/exe/}
}
\author{
  Ge Tan
}

\seealso{
  \code{\link{axtChain}}
}
\examples{
  \dontrun{
  ## 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")
  }
}