This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Beagle Error Coverting File

Dear all I got the errors below when trying to convert gen extension file to call genotype using gprobs2beagle.jar the errors : at beagleutil.a.<init>(Unknown Source) at beagleutil.c.b(Unknown Source) at beagleutil.c.next(Unknown Source) at beagleutil.Gprobs2Beagle.main(Unknown Source)

any help of the source of these error please ? thanks a lot

imputation

Can you please paste exact command you gave and exact error it showed?

1 answer

Hi many thanks for your reply. the message error was : at beagleutil.a.<init>(Unknown Source) at beagleutil.c.b(Unknown Source) at beagleutil.c.next(Unknown Source) at beagleutil.Gprobs2Beagle.main(Unknown Source)

we got this error after running the script blow:

ls *.gen.gz | sed 's/.gen.gz//g' > FileList.tmp cat FileList.tmp | while read line do inputgen=$line".gen.gz" inputsample=$line".sample" outputname=$line".call" echo "Processing : "$inputgen echo "Transforming sample : "$inputsample cut -d" " -f2 $inputsample | sed '1,2d' > Gensamp1.tmp echo "Marker" > Gensamp2.tmp echo "Allele1" >> Gensamp2.tmp echo "Allele2" >> Gensamp2.tmp cat Gensamp1.tmp | while read twoline do echo $twoline >> Gensamp2.tmp echo $twoline >> Gensamp2.tmp echo $twoline >> Gensamp2.tmp done cat Gensamp2.tmp | tr '\n' ' ' > Genfile.tmp echo "" >> Genfile.tmp gzip -dc $inputgen | cut -d" " -f2,4- >> Genfile.tmp echo "Calling : "$inputgen cat Genfile.tmp | java -jar gprobs2beagle.jar 0.34 0 > $outputname echo "Compressing : "$outputname gzip $outputname rm Genfile.tmp rm Gensamp?.tmp done rm FileList.tmp

may be we need to install some source code, if yes how please? or the error come also from the scipr itself because when I checked the Genfile.tmp file I found that only the first line was good with marker name followed by allele 1 and 2 then the probabilities but for the third line there is the chr number folowed by position then alleles and prob as shown in this example: Marker Allele1 Allele2 1 1 1 2 2 2 rs3802985 C T 1 0 0 1 0 0 1 0 11 2 G A 0.939588 0.059824 0.000588 0.978112

thanks a lot for your help

enter code here
ls *.gen.gz | sed 's/.gen.gz//g' > FileList.tmp
cat FileList.tmp | while read line
do
inputgen=$line".gen.gz"
inputsample=$line".sample"
outputname=$line".call"
echo "Processing : "$inputgen
echo "Transforming sample : "$inputsample
cut -d" " -f2 $inputsample | sed '1,2d' > Gensamp_1.tmp
echo "Marker" > Gensamp_2.tmp
echo "Allele1" >> Gensamp_2.tmp
 echo "Allele2" >> Gensamp_2.tmp
cat Gensamp_1.tmp | while read twoline
do
echo $twoline >> Gensamp_2.tmp
echo $twoline >> Gensamp_2.tmp
echo $twoline >> Gensamp_2.tmp
done
     cat Gensamp_2.tmp | tr '\n' ' ' > Genfile.tmp
      echo "" >> Genfile.tmp
       gzip -dc $inputgen | cut -d" " -f2,4- >> Genfile.tmp
       echo "Calling : "$inputgen
      cat Genfile.tmp | java -jar gprobs2beagle.jar 0.34 0 > $outputname
      echo "Compressing : "$outputname
      gzip $outputname
      rm Genfile.tmp
      rm Gensamp_?.tmp
      done
      rm FileList.tmp

You can edit your question easily by just clicking on edit (as this is not an answer to the original post). Also when you paste code, you can use CTRL+k which will make it readable.

is it clear now ? thanks

Yes. Also as I said, you could have edit your original question without putting this as an answer. Anyways, I think the problem is with your input file. Can you check if it is working on 1 file just using - cat [input file] | java -jar gprobs2beagle.jar [threshold] [missing] > [output file]

thanks for your reply I will check it and let you know

Log in to answer this question.