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

mapping input contig names to output #10

Open
lskatz opened this issue Apr 4, 2017 · 6 comments
Open

mapping input contig names to output #10

lskatz opened this issue Apr 4, 2017 · 6 comments

Comments

@lskatz
Copy link

lskatz commented Apr 4, 2017

Given that I get a contig name like RNODE_1_length_2185_cov_1230.39000, how would I know which contig that is in the original file? I can search the coverage field 1230.39 to find the original contig name NODE_18_length_2240_cov_1230.39_component_1 but I hope there is a better way. Even in the stdout, the contig name is different as EDGE_703_length_2240_cov_1230.39_component_1.

This output is from plasmid spades. Sorry, I don't know if/when I would have the time to do a head to head comparison, regarding my previous issue #8.

@rozovr
Copy link
Collaborator

rozovr commented Apr 4, 2017

For cycles that are composed of multiple contigs in the graph, the second output file is meant for this purpose:
.cycs.paths_w_cov.txt - a text file containing information about plasmids composed of multiple contigs.
The README contains information on the format of this file.

For plasmids that are isolated in the graph, I don't think the names are maintained, but you can also parse them out of the original fastg by searching for self edges, having headers formatted as X: X;

@rozovr
Copy link
Collaborator

rozovr commented Apr 4, 2017

and no worries about the comparison

@lskatz
Copy link
Author

lskatz commented Apr 4, 2017

.cycs.paths_w_cov.txt is a blank file. Do I need to update from 0.62, or how do I get the right contents of it? This is how I run recycle.py:

recycle.py -g plasmidspades.fastg -k 55 -b reads_pe_primary.sort.bam -i True --max_CV 0.5 > cv.log

On this particular run, I have a fasta file with extension .cycs.fasta with header >RNODE_1_length_4125_cov_569.98200. The cov.txt file is zero bytes. Stdout was

85.0667 702.422769783 2152.29
================== path, coverage levels when added ====================
1432  nodes remain in component

==================final_paths identities after updates: ================
('EDGE_138_length_4180_cov_569.982_component_1',)

@rozovr
Copy link
Collaborator

rozovr commented Apr 5, 2017

Together these outputs mean there was only one plasmid found, and that it was isolated in the original graph. the cov.txt file only gets written to when there are cycles made up of multiple nodes (edges in spades' convention).

@lskatz
Copy link
Author

lskatz commented Apr 5, 2017

Ok but going back to the original question, would it be possible to make a method of mapping source contigs to output contigs?

@rprops
Copy link

rprops commented Oct 18, 2017

I would appreciate this feature as well. This makes it possible to further analyse putative contigs in anvi'o by importing the full assembly and map the contigs into putative plasmid bins.

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

3 participants