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

how to write pyrad2fasta output to fasta file #2

Open
advaudo opened this issue Jun 29, 2018 · 3 comments
Open

how to write pyrad2fasta output to fasta file #2

advaudo opened this issue Jun 29, 2018 · 3 comments

Comments

@advaudo
Copy link

advaudo commented Jun 29, 2018

Hi,
I'm trying to map my consensus sequences from ipyrad to a reference genome, but there are no actual fasta files of these sequences. pyrad2fasta seems like a perfect option, but it only prints out the list of sequences on screen. Is it possible to actually create a fasta file with this function?
Thanks so much for your help,
Anthony

@pimbongaerts
Copy link
Owner

pimbongaerts commented Jul 3, 2018

Hi Anthony. All you need to do is redirect that output to a file, using >. For example:
python3 pyrad2fasta.py ipyrad_output.loci > ipyrad_output.fasta (or see example here). Hope that helps!

@advaudo
Copy link
Author

advaudo commented Jul 4, 2018

That's great thanks, I did manage to figure out that part the other day. I do have one slightly more complicated question if you know. The .loci file has dashes "--" in some of the reads, especially at the end of some reads, I suppose these dashes come from where sequences aren't aligned perfectly at the end with missing bases. These dashes are transferred .fasta file as well and seem to create some issues with mapping and blasting sequences, do you know a way these can be fixed or removed? Sorry if this is out of topic, just new to all this.
Thanks,
Anthony

@pimbongaerts
Copy link
Owner

pimbongaerts commented Jul 5, 2018

Yes - the gaps are purposely transferred to make sure it still corresponds to the positions as referred to in the VCF. However, for mapping etc. they can be easily removed with e.g.: $ sed 's/-//g' ipyrad_output.fasta > ipyrad_output_no_gaps.fasta. Hope that helps?

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

2 participants