Open itsmestewart opened 6 months ago
Hi,
The current implementation of iSAFE is unable to process the entire genome. Many selection scan tools, such as those listed at slescan, are designed for this purpose. However, I have addressed a similar question in https://github.com/alek0991/iSAFE/issues/6, which details how to use iSAFE for this purpose. A similar approach was used in Colomer-Vilaplana et al. 2022.
Could you please share a small example of your input along with the error so that I can replicate it?
Best, Ali
Dear Alex, I appreciate you for getting back to me so quickly.
I am sorry my question seems to basic. I truly appreciate your assistance.
I will also consider dividing the chromosomes into chunks. Thank you for the recommendation
Yes, I was running this command per chromosome.
isafe --input file1.hap --output file1 --format hap, with default setting. My input file looks like this: ( This was obtained after converting phased vcf to haps by plink2 with little modification into ISAFE format
This is an error I was getting.
File "/home/miniconda3/envs/iSafe/bin/isafe", line 10, in sys.exit(run()) ^^^^^ File "/home/miniconda3/envs/iSafe/lib/python3.12/site-packages/isafe/isafe.py", line 185, in run total_window_size = POS.max() - POS.min()
TypeError: unsupported operand type(s) for -: 'str' and 'str
The error is occurring because the POS variable contains string values instead of numeric values, and the subtraction operation is not supported between strings. Please ensure all POS values are numeric.
Can I run iSAFE using a vcf file on the entire chromosome?
Second, I tried to run iSafe on the haps file after converting the vcf containing phased data to haps by plink2. But I ended up getting an error, as shown below.
File "/home/miniconda3/envs/iSafe/bin/isafe", line 10, in
sys.exit(run())
^^^^^
File "/home/miniconda3/envs/iSafe/lib/python3.12/site-packages/isafe/isafe.py", line 185, in run
total_window_size = POS.max() - POS.min()