a question about chainMergeSort

133 views
Skip to first unread message

Dan

unread,
Nov 14, 2012, 5:14:00 AM11/14/12
to gen...@soe.ucsc.edu
Dear Professor,
    I encountered a  problem when running chainMergeSort. The output and input are the same for ChainMergeSort.
And  my command is:
    axtChain -linearGap=loose cer-vs-par.axt  par.2bit  cer.2bit  cer-vs-par.axt.chain
    chainMergeSort  cer-vs-par.axt.chain  >cer-vs-par.axt.chain.mergesort
Is there anything wrong with it?
My linux version is: 3.2.1-gentoo-r2.
 
 
Best regard,
 
Dan Zhang
Computational & Evolutionary Genomics Group
Institute of Zoology, CAS
Address: 1 Beichen West Road, Chaoyang District, Beijing 100101, P.R.China
Tel: +86-10-64806338


Brooke Rhead

unread,
Nov 15, 2012, 9:08:55 PM11/15/12
to Dan, gen...@soe.ucsc.edu
Hi Dan,

The chainMergeSort command merges multiple sorted files together, so I
would expect the input and output file to be the same if only one file
is supplied to the command. Run chainMergeSort without arguments to see
a more detailed description:

$ chainMergeSort
chainMergeSort - Combine sorted files into larger sorted file
usage:
chainMergeSort file(s)
Output goes to standard output
options:
-saveId - keep the existing chain ids.
-inputList=somefile - somefile contains list of input chain files.
-tempDir=somedir/ - somedir has space for temporary sorting data,
default ./

Perhaps you want to use the chainSort command instead?

--
Brooke Rhead
UCSC Genome Bioinformatics Group
> --
>
>
>

Dan

unread,
Nov 19, 2012, 3:20:00 AM11/19/12
to gen...@soe.ucsc.edu
 
Hi Brooke,
   Thanks for your reply. Maybe I misunberstood the functions of axtChain and chainMergeSort. axtChain is to chain together axt alignments and extend axt alignments as long as possible. And chainMergeSort is just to sort many chain files together. Is that right?




Brooke Rhead

unread,
Nov 20, 2012, 8:29:46 PM11/20/12
to Dan, gen...@soe.ucsc.edu
Hi Dan,

chainMergeSort takes N chain files that are already sorted by score and
interleaves them together so the resulting output file is also sorted by
score. It does this by grabbing the first chain from each of the N
files and just sorts those N items. It then outputs the highest scoring
chain, grabs the next chain from the file that the highest-scoring chain
came from, and repeats the process until there are no more chains in any
of the files. (If you run chainMergeSort on unsorted input files, the
output will not be sorted either.)

To sort a single file, you can use the chainSort command.

Your understanding of axtChain is correct.

--
Brooke Rhead
UCSC Genome Bioinformatics Group


>>> And my command is:
>>> axtChain -linearGap=loose cer-vs-par.axt par.2bit cer.2bit
>>> cer-vs-par.axt.chain
>>> chainMergeSort cer-vs-par.axt.chain >cer-vs-par.axt.chain.mergesort
>>> Is there anything wrong with it?
>>> My linux version is: 3.2.1-gentoo-r2.
>>> Best regard,
>>> Dan Zhang
>>> Computational & Evolutionary Genomics Group
>>> Institute of Zoology, CAS
>>> Address: 1 Beichen West Road, Chaoyang District, Beijing 100101, P.R.China
>>> Tel: +86-10-64806338
>>>
>>>
>>> --
>>>
>>>
>>>
>
>
>
>
>
> --
>
>
>
Reply all
Reply to author
Forward
0 new messages