Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a positive computational control for correct function of bed2psl.py? #393

Open
SchwarzEM opened this issue Apr 28, 2018 · 0 comments

Comments

@SchwarzEM
Copy link

I am trying to run bed2psl.py on a rather small BED aligment file, but it's not working. MtDNA.fa is the target (reference) sequence in the BED alignment; chrM_pilon.fa is the query sequence.

Here's how it's gone:

cgat index_fasta MtDNA.cgat.db MtDNA.fa --log=MtDNA.log --error=MtDNA.err ;
cgat index_fasta chrM_pilon.cgat.db chrM_pilon.fa --log=MtDNA.log --error=MtDNA.err ;

cgat bed2psl --query=chrM_pilon.cgat.db.fasta --target=MtDNA.cgat.db.fasta --genome-file=MtDNA.cgat.db.fasta --stdin=vc2010_M.minimap2.n2_MtDNA.bed --stdout=vc2010_M.minimap2.n2_MtDNA.psl --log=vc2010_M.minimap2.n2_MtDNA.log --error=vc2010_M.minimap2.n2_MtDNA.err ;

ls -lt vc2010_M.minimap2.n2_MtDNA.* ;

-rw-r--r-- 1 emsch beacon 1663 Apr 28 16:01 vc2010_M.minimap2.n2_MtDNA.log
-rw-r--r-- 1 emsch beacon 67 Apr 28 16:01 vc2010_M.minimap2.n2_MtDNA.psl
-rw-r--r-- 1 emsch beacon 0 Apr 28 16:01 vc2010_M.minimap2.n2_MtDNA.err # zero-byte
-rw-r--r-- 1 emsch beacon 14140 Apr 10 22:04 vc2010_M.minimap2.n2_MtDNA.bed

# the PSL output didn't work:
cat vc2010_M.minimap2.n2_MtDNA.psl ;

0 0 0 0 0 0 0 0 + chrM_pilon 0 0 13750 MtDNA 0 0 13750 0 ,

To prove that this wasn't because I was completely unable to use CGAT on vc2010_M.minimap2.n2_MtDNA.bed at all, I then ran the following script to extract a FASTA file from the BED alignment:

cgat bed2fasta --genome-file=MtDNA.cgat.db.fasta --stdin=vc2010_M.minimap2.n2_MtDNA.bed --stdout=vc2010_M.minimap2.n2_MtDNA.fasta ;

This did work! It emitted a 13,750-nt FASTA file, vc2010_M.minimap2.n2_MtDNA.fasta, which was clearly distinct from either MtDNA.fa (13,794 nt) or chrM_pilon.fa (13,988 nt).

So, my question: is there some way to get bed2psl.py to work on anything?

If somebody wants to try debugging it or testing it on my input files, they are welcome to download the input files from these URLs:

http://woldlab.caltech.edu/~schwarz/misc/MtDNA.fa
http://woldlab.caltech.edu/~schwarz/misc/chrM_pilon.fa
http://woldlab.caltech.edu/~schwarz/misc/vc2010_M.minimap2.n2_MtDNA.bed

Alternatively, if anybody out there has a small BED alignment file that they know will work, and would like to provide me both with the BED file and with line-commands that I should run in order to make bed2psl.py function on this BED file, I'd be quite grateful; it would at least let me know if my failures are due to my not having bed2psl.py installed properly, or whether there's something else going wrong.

Thank you for any information that you can provide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant