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

Error in running genetic diversity diffs #1

Closed
Aljumiliy1 opened this issue Apr 30, 2019 · 3 comments
Closed

Error in running genetic diversity diffs #1

Aljumiliy1 opened this issue Apr 30, 2019 · 3 comments

Comments

@Aljumiliy1
Copy link

Dear Alana,
I am trying to run your script on my sequence data, I have short fragment (397 bp) of haploid sequence samples. It runs well at the beginning until I get an error message, please see a copy of my screen below:

[1] STEP ONE: Loading in all the variables
[1]
[1] An error message after this indicates your working directory is not valid
[1] Not to worry, your working directory IS valid! I've successfully set the working directory
[1]
[1] An error message after this indicates your file is not located in the directory you listed
[1] Not to worry, your file IS located in the directory! I'm pulling it into my memory to extract the parts we are interested in
[1]
[1] I have found the haplotype definition block in your arlequin file
Error in if (minhaplength == maxhaplength) { :
missing value where TRUE/FALSE needed

The script I have used is :
genetic_diversity_diffs("C:/Users/mbx/Desktop/pvalue","samples.arp",1000,"Y","Y")

My data file has been modified to meet the same criteria for the example file that found with the script, I have uploaded a text data file similar to the .arp one I have used.

kindest regards,

Ahmed

samples.txt

@laninsky
Copy link
Owner

Hi Ahmed,

Thanks for taking the time to log this issue. The bug happened because the code was not expecting any blank lines within the haplotype definition block, but you had an empty line between HaplList ={ and Hap_1 TCTTGTATCATCATCAATCCAT. I've tweaked the code so that it will now deal with files formatted like that, so hopefully it will be good to go for you if you reclone the repository. I've also attached the output files from running your input file on my computer just in case you want to double check the code is running correctly for you.

Sorry for the inconvenience!

Alana

nucl_diffs_summary.txt
nucleotide_diversity_differences.txt
hapl_diffs_summary.txt
haplist.txt
haplotype_diversity_differences.txt

@Aljumiliy1
Copy link
Author

Thank you Alana, everything going smoothly now.
Ahmed

@laninsky
Copy link
Owner

laninsky commented May 1, 2019

Awesome, glad to hear it Ahmed - let me know if you run into any other bugs!

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