java 7 swing application rendering wrong colors on rhel7 machine - java-7

I have a java swing application that is compiled with java 1.7_u60. It is launching fine on RHEL6.4 while the same when launched on the RHEL7 machine does not render properly.
In fact there is a black color everywhere and nothing is shown.
While launching application I also get the following Warning message.
WARNING: Application calling GLX 1.3 function "glXCreatePbuffer" when GLX 1.3 is not supported! This is an application bug!
I tried to update the GLX to 1.3 or higher but could not update this to higher version.
The output of glxinfo is as follows.
$ glxinfo
name of display: sahara:2
display: sahara:2 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float,
GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context,
GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer,
GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.2
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_MESA_multithread_makecurrent, GLX_OML_swap_method,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGI_make_current_read
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 256 bits)
OpenGL version string: 2.1 Mesa 9.2.5
OpenGL shading language version string: 1.30
OpenGL extensions:
GL_AMD_conservative_depth, GL_AMD_draw_buffers_blend,
GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object,
GL_ARB_ES2_compatibility, GL_ARB_blend_func_extended,
GL_ARB_color_buffer_float, GL_ARB_conservative_depth, GL_ARB_copy_buffer,
GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_texture,
GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend,
GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced,
GL_ARB_explicit_attrib_location, GL_ARB_fragment_coord_conventions,
GL_ARB_fragment_program, GL_ARB_fragment_program_shadow,
GL_ARB_fragment_shader, GL_ARB_framebuffer_object,
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary,
GL_ARB_half_float_pixel, GL_ARB_half_float_vertex,
GL_ARB_instanced_arrays, GL_ARB_internalformat_query,
GL_ARB_invalidate_subdata, GL_ARB_map_buffer_range, GL_ARB_multisample,
GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_occlusion_query2,
GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite,
GL_ARB_provoking_vertex, GL_ARB_robustness, GL_ARB_sampler_objects,
GL_ARB_shader_bit_encoding, GL_ARB_shader_objects,
GL_ARB_shader_texture_lod, GL_ARB_shading_language_100,
GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing,
GL_ARB_shadow, GL_ARB_sync, GL_ARB_texture_border_clamp,
GL_ARB_texture_compression, GL_ARB_texture_compression_rgtc,
GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
GL_ARB_texture_non_power_of_two, GL_ARB_texture_rectangle,
GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_storage,
GL_ARB_texture_swizzle, GL_ARB_timer_query, GL_ARB_transform_feedback2,
GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced,
GL_ARB_transpose_matrix, GL_ARB_uniform_buffer_object,
GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object,
GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
GL_ARB_vertex_type_2_10_10_10_rev, GL_ARB_window_pos,
GL_ATI_blend_equation_separate, GL_ATI_draw_buffers,
GL_ATI_separate_stencil, GL_ATI_texture_compression_3dc,
GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once, GL_EXT_abgr,
GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_equation_separate,
GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
GL_EXT_compiled_vertex_array, GL_EXT_copy_texture, GL_EXT_draw_buffers2,
GL_EXT_draw_instanced, GL_EXT_draw_range_elements, GL_EXT_fog_coord,
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_object,
GL_EXT_framebuffer_sRGB, GL_EXT_gpu_program_parameters,
GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil,
GL_EXT_packed_float, GL_EXT_packed_pixels, GL_EXT_pixel_buffer_object,
GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_provoking_vertex,
GL_EXT_rescale_normal, GL_EXT_secondary_color,
GL_EXT_separate_specular_color, GL_EXT_shadow_funcs,
GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_subtexture,
GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_array,
GL_EXT_texture_compression_latc, GL_EXT_texture_compression_rgtc,
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
GL_EXT_texture_env_add, GL_EXT_texture_env_combine,
GL_EXT_texture_env_dot3, GL_EXT_texture_integer, GL_EXT_texture_lod_bias,
GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,
GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode,
GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm,
GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback,
GL_EXT_vertex_array, GL_EXT_vertex_array_bgra,
GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip,
GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate,
GL_MESA_pack_invert, GL_MESA_texture_array, GL_MESA_texture_signed_rgba,
GL_MESA_window_pos, GL_MESA_ycbcr_texture, GL_NV_blend_square,
GL_NV_conditional_render, GL_NV_fog_distance, GL_NV_light_max_exponent,
GL_NV_packed_depth_stencil, GL_NV_primitive_restart,
GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
GL_NV_texture_rectangle, GL_OES_EGL_image, GL_OES_read_format,
GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,
GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
2 GLX Visuals
visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
----------------------------------------------------------------------------
0x023 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None
0x027 24 dc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None
2 GLXFBConfigs:
visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
----------------------------------------------------------------------------
0x023 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None
0x027 24 dc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None
I would love to have your help.
Thanks a ton
Ankit

Related

Creating share of one variable in Top/Bottom 10 of another variable

I have 5 variables: nacional , nacional=1 for natives , nacional=0 for non-natives, FirmsID: NPC_FIC, Establsihmenti;s ID: ESTAB_ID, Occupation codes: CCPCodes and skill ratio: sk_ratio.I am going to compute the share of immigrants in Top 10 and Bottom 10 occupations. Since each firm has more than one establishment more often makes the solution tricky. Any help are apprecited.
input float nacioanal double(NPC_FIC ESTAB_ID) float CCPCodes double sk_ratio
1 500988754 100861 1114 4.359499
1 501950749 893218 1114 4.359499
1 500988750 990861 6914 2.309491
1 501951290 125210 1114 4.359499
1 500988760 100861 1141 5.459470
1 502000740 -820100 1114 4.359499
0 500988762 880861 7514 66.359409
1 500988754 100861 1114 4.359499
1 577988759 210869 4116 6.059120
1 500988092 670869 3216 10.059785
I used 'extremes sk_ratio CCPCodes, n(10)' to make top/bottom 10 but because of repeated valules I could not go futher.

How to animate an svg in reverse with anime.js?

I've tweaked this example of an SVG animation from the anime.js docs:
https://codepen.io/fergusmeiklejohn/pen/gOwdVpq
I'm trying to animate drawing the word from the end of the word to the beginning. Can Anime.js do this? direction: 'reverse' doesn't work as I hoped it would. It animates in reverse but starts with the complete svg and ends with nothing.
I also had the idea that if anime can't do this, is a solution to redraw the SVG in reverse?
Thanks all! :-)
SVG mask solution
The idea is to first hide the word with the mask, then use the stroke-dashoffset animation for the mask to gradually reveal the word.
The mask will have a wide line to show the bottom word with different line widths in different parts of the word.
To do this, we need to draw a center line in the vector editor, repeating all the bends of the lower word
The red line in the figure is the centerline for the wide line of the mask.
body {
height: 100vh;
width: 100%;
background-color: #35dad2;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
}
svg {
width: 40em;
}
#word {
fill:white;
}
#msk {
fill:none;
stroke:#fff;
stroke-width:12;
stroke-dasharray:1100px;
stroke-dashoffset:1100px;
}
<h3>
<svg xmlns="http://www.w3.org/2000/svg" class="subtitle" viewBox="0 0 229.2 69.6">
<defs>
<mask id="msk">
<path d="M226.7 46.7s-.6-4-2-5.2a9 9 0 00-7.6-1.8c-3.6.8-5.7 4.7-8.7 7-3 2.1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.8-7.7 9.8-12.9 13.3-3.3 2.2-8.4 1.6-11.3 4.5-2.8 3-.2 11.1-4.3 11.5-1.2.1-1.6-1.8-1.8-3-.4-2.2 3.3-8 1.4-6.7-3 1.8-5.6 4.4-8.7 6-2.4 1.1-5 2.8-7.6 2.5-1.3-.1-3-.7-3.5-2-1.7-3.8 1.2-8.4 2.7-12.2 1.8-4.3 4.3-8.3 7.2-12 2-2.4 3.8-6.1 7-6.5 2.2-.2 5.1 1.4 5.9 3.6.7 2.3-1.3 4.7-2.6 6.7-1.7 2.7-3.7 5.8-6.8 7-2.2.8-6.5 1.9-7-.4-2-7 6.3-15.3 9.7-22.5 2.7-5.5 0-16.2-3.4-12.4-4.7 5.2-7.5 11.3-11.3 16.8-3.6 5.2-7.3 10.3-11.1 15.3-2.4 3-5 6-7.6 9-4 4.4-8 9-12.8 12.8C43.3 63 39 68.6 36 66.8c-2.4-1.4-2.4-4.5 0-8.3 4.5-7.2 10.3-10.4 14.4-20.4 3.2-7.7 10.4-13.8 12.5-22 .5-1.8.7-4 0-5.7-.4-1.1-1.8-3.6-2.4-2.6-4.1 7.3-4.2 16.6-10.5 21.6a248 248 0 00-29.7 29.3c-.9 1-3-.4-3.6-1.6-1-2.3 1.7-4.8 2.8-7.1 3-6 6.9-11.5 10.3-17.3 2.6-4.2 5.4-8.2 7.7-12.6 1.6-3 5.5-6 4-9-1.4-2.6-5.9-2-9-1.7-4 .4-7.5 2.9-11.2 4.7a76.8 76.8 0 00-10 5.8C9 21.7 5 22.9 4.3 26c-.6 2 .5 4.6 2 6.2a7.7 7.7 0 005.2 2.2c1.8 0 5-1.7 5-1.7">
<!-- Animation of the mask opening the word -->
<animate id="an"
attributeName="stroke-dashoffset"
begin="0s"
dur="3s"
values="1100;0"
fill="freeze"
repeatCount="indefinite"/>
</path>
</mask>
</defs>
<!-- The word is hidden by the mask -->
<path id="word" mask="url(#msk)" d="M79.7 29.1a344.4 344.4 0 01-20.4 23.4 152 152 0 01-13.8 12.6c-4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.6-1.7v-.6z"/>
</svg>
</h3>
With a 2s pause between reps
body {
height: 100vh;
width: 100%;
background-color: #6247D5;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
}
svg {
width: 40em;
}
#word {
fill:white;
}
#msk {
fill:none;
stroke:#fff;
stroke-width:12;
stroke-dasharray:1100px;
stroke-dashoffset:1100px;
}
<h3>
<svg xmlns="http://www.w3.org/2000/svg" class="subtitle" viewBox="0 0 229.2 69.6">
<defs>
<mask id="msk">
<path d="M226.7 46.7s-.6-4-2-5.2a9 9 0 00-7.6-1.8c-3.6.8-5.7 4.7-8.7 7-3 2.1-6 4.4-9.3 6.3-3.2 1.7-6.5 3.6-10 4.3-1.9.4-5.3 1.6-5.6-.2-.8-3.7 2.8-8.5 4.3-12.7 1.8-4.9 2.5-10.5 5.8-14.6 2-2.6 4.7-5.5 7.9-5.6 2.2 0 4.8 1.5 5.5 3.6 1 2.7-1 5.9-2.5 8.3-1.4 2.1-3.4 4.1-5.8 5-4 1.4-9.3-3.4-12.9-.2-6.7 6-11 9.6-19 16.6-.8.8-5.6.7-5-.2 8.7-11 14-25.5 22-38.2 1.6-2.4 5.2 2 7.3 1 .8-.5 1.5-1.7 1-2.4-.8-1.7-4.3.6-5.7-.8-1-1 .3-3-.4-4.4-.5-.9-2-3.8-2.5-2-1 3.3-2.8 5.3-5.3 6.6-2.1 1.2-7.3.8-7.3.8v0s-.4-2.4-1.3-2.8c-1.4-.6-2.5-1.3-4.4 1.3 0 0-3.4.9-3.1 2 .1 1 1.7.5 2.5.6 1.5.3 3 .8 4.4.9 3.2.3 8-2.7 9.7 0 3.4 5-3.8 11.8-7.3 16.8-2.3 3.2-6.2 2.9-8.5 8.1-3.9 8.7-10.7 15.8-16.5 12.1-1.5-1 1-5.1 1-5.1 2.8-11.3 18.1-16 12.7-22.8-.4-.5-.9-1.3-2 .5-7.1 12.8-3.6 3.9-6.5 7.2-2 2.3-5.4 2.7-8 4.2-4.3 2.4-8.8 4.8-12.8 7.7-1.4 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.4-2.6-5.9-2-9-1.7-4 .4-7.5 2.9-11.2 4.7a76.8 76.8 0 00-10 5.8C9 21.7 5 22.9 4.3 26c-.6 2 .5 4.6 2 6.2a7.7 7.7 0 005.2 2.2c1.8 0 5-1.7 5-1.7">
<!-- Animation of the mask opening the word -->
<animate id="an"
attributeName="stroke-dashoffset"
begin="0s;an.end+2s"
dur="3s"
values="1100;0"
fill="freeze"
repeatCount="1"/>
</path>
</mask>
</defs>
<!-- The word is hidden by the mask -->
<path id="word" mask="url(#msk)" d="M79.7 29.1a344.4 344.4 0 01-20.4 23.4 152 152 0 01-13.8 12.6c-4.6 3.5-7.9 5.3-9.8 5.3h-.4c-2.9 0-4.8-1-5.6-3l-.2-1v-.6c0-2.2 1.8-6.5 5.5-12.8l7.8-14.3c-11.4 10.8-19 18.3-23 22.1-1.8 0-3.4-.6-4.8-1.8-.6-.7-.9-1.7-.9-2.9 0-2.3 1.8-6.5 5.4-12.6a6587 6587 0 0016.3-30.1h-.2A48.2 48.2 0 008.5 28.9v.1a5.5 5.5 0 002.5 2.9c1.5.5 3 .7 4.5.7l.9.1c0 .9-1.6 1.9-4.8 3.1-1.7.5-3.1.7-4.2.7h-.5c-2.5 0-4.2-2.8-4.9-8.4l-.1-1.6v-1.1a7 7 0 012.8-5.9c1.8-1.7 4.1-3.4 7-5.1 4-2.3 9.3-4.5 15.8-6.6A50 50 0 0139 6c1.5.2 2.9.8 4 1.8a7.9 7.9 0 012.6 5.9 1744.2 1744.2 0 01-17.5 32v.1l22.1-20.9C56 14 59.2 7.7 59.5 6.1c1.4.2 2.7.7 4 1.7a7.7 7.7 0 012.7 6.2v.1C49.7 44 41.2 59.4 40.8 60.4c1.8-1.6 4.3-4.2 7.7-7.8 9.4-10.6 18.4-22 27.2-34A79.7 79.7 0 0086.4 1l.1-1.1v-.1l.2-.1c1.5.4 3.1 1.4 4.9 3C93.4 5 94.4 6.8 94.4 8c-2.9 5.2-7.8 12.2-14.7 21.1zM125.8 40l-1.6 3-2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8-3.5 6-4.2 9.4 0 .3.6.6 1.7.7l.7.1h.7c3.1 0 7.8-2.7 13.8-8.1 5.1-4.6 8.7-7.5 10.9-8.8 2-1.1 3.7-1.7 5.1-1.7 4.1 0 7 1.7 8.6 5 .4.9.5 1.8.5 2.5zm-35.5-4.6l4.1.1c1.1-.2 2.2-.9 3.4-2 2.1-2.3 3.1-4.6 3.1-6.9-.1-.8-.3-1.2-.7-1.2-2.8.8-6.1 4.2-9.9 10zm-57.5 9.4a34 34 0 00-2.7 2.3c-.6.6-1 1.2-1.4 1.8 1.5-.4 2.6-1 3.4-1.8.4-.5.6-1 .6-1.7v-.6z"/>
</svg>
</h3>
SVG mask + JS solution
Drawing a word, erasing a word by clicking on a button
var draw = true;
function play() {
var path = document.getElementById('path');
path.style.strokeDashoffset = (draw) ? '0' : '1109';
draw = !draw;
}
body {
height: 100vh;
width: 100%;
background-color:#6247D5;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
}
svg {
width: 40em;
}
#word {
fill:white;
}
#msk {
fill:none;
stroke:#fff;
stroke-width:12;
stroke-dasharray:1109px;
stroke-dashoffset:1109px;
}
<button onclick="play();">Play</button>
<h3>
<svg xmlns="http://www.w3.org/2000/svg" class="subtitle" viewBox="0 0 229.2 69.6">
<defs>
<mask id="msk">
<path id="path" d="M226.7 46.7s-.6-4-2-5.2a9 9 0 00-7.6-1.8c-3.6.8-5.7 4.7-8.7 7-3 2.1-6 4.4-9.3 6.3-3.2 1.7-6.5 3.6-10 4.3-1.9.4-5.3 1.6-5.6-.2-.8-3.7 2.8-8.5 4.3-12.7 1.8-4.9 2.5-10.5 5.8-14.6 2-2.6 4.7-5.5 7.9-5.6 2.2 0 4.8 1.5 5.5 3.6 1 2.7-1 5.9-2.5 8.3-1.4 2.1-3.4 4.1-5.8 5-4 1.4-9.3-3.4-12.9-.2-6.7 6-11 9.6-19 16.6-.8.8-5.6.7-5-.2 8.7-11 14-25.5 22-38.2 1.6-2.4 5.2 2 7.3 1 .8-.5 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8-6.8 7-2.2.8-6.5 1.9-7-.4-2-7 6.3-15.3 9.7-22.5 2.7-5.5 0-16.2-3.4-12.4-4.7 5.2-7.5 11.3-11.3 16.8-3.6 5.2-7.3 10.3-11.1 15.3-2.4 3-5 6-7.6 9-4 4.4-8 9-12.8 12.8C43.3 63 39 68.6 36 66.8c-2.4-1.4-2.4-4.5 0-8.3 4.5-7.2 10.3-10.4 14.4-20.4 3.2-7.7 10.4-13.8 12.5-22 .5-1.8.7-4 0-5.7-.4-1.1-1.8-3.6-2.4-2.6-4.1 7.3-4.2 16.6-10.5 21.6a248 248 0 00-29.7 29.3c-.9 1-3-.4-3.6-1.6-1-2.3 1.7-4.8 2.8-7.1 3-6 6.9-11.5 10.3-17.3 2.6-4.2 5.4-8.2 7.7-12.6 1.6-3 5.5-6 4-9-1.4-2.6-5.9-2-9-1.7-4 .4-7.5 2.9-11.2 4.7a76.8 76.8 0 00-10 5.8C9 21.7 5 22.9 4.3 26c-.6 2 .5 4.6 2 6.2a7.7 7.7 0 005.2 2.2c1.8 0 5-1.7 5-1.7"
style="transition: stroke-dashoffset 3s ease-in-out; stroke-dashoffset: 1109;">
</path>
</mask>
</defs>
<!-- The word is hidden by the mask -->
<path id="word" mask="url(#msk)" d="M79.7 29.1a344.4 344.4 0 01-20.4 23.4 152 152 0 01-13.8 12.6c-4.6 3.5-7.9 5.3-9.8 5.3h-.4c-2.9 0-4.8-1-5.6-3l-.2-1v-.6c0-2.2 1.8-6.5 5.5-12.8l7.8-14.3c-11.4 10.8-19 18.3-23 22.1-1.8 0-3.4-.6-4.8-1.8-.6-.7-.9-1.7-.9-2.9 0-2.3 1.8-6.5 5.4-12.6a6587 6587 0 0016.3-30.1h-.2A48.2 48.2 0 008.5 28.9v.1a5.5 5.5 0 002.5 2.9c1.5.5 3 .7 4.5.7l.9.1c0 .9-1.6 1.9-4.8 3.1-1.7.5-3.1.7-4.2.7h-.5c-2.5 0-4.2-2.8-4.9-8.4l-.1-1.6v-1.1a7 7 0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-7-1.8v-.1l4-9.3 4.2-.3h1.2c2.7 0 5.3.3 7.8.8v.1l-4.9 5.1 7.3-.8c3-5.5 4.5-8.6 4.5-9.3 1.2 0 2.5.6 4.1 1.8a7.4 7.4 0 012.3 5.4c0 .4-.2 1-.6 1.6l2.6-.1h2.8l.1.2-1.9 4.3h-.1l-5.6-.4-16 28.7h.1l12.1-11.2h.1l2.5-4.4c1.1-1.6 2.6-3.4 4.5-5.4a23 23 0 015.4-4.3c1.4-.9 3-1.8 4.9-2.5l.4-.1c1.8 0 3.8.5 5.9 1.4 2.5 1.2 3.7 3 3.7 5.5 0 3.2-2 6.9-6 11.2a27.9 27.9 0 01-5.5 4.3l-.7.1-7.8.1c-2.1 2.8-3.5 6-4.2 9.4 0 .3.6.6 1.7.7l.7.1h.7c3.1 0 7.8-2.7 13.8-8.1 5.1-4.6 8.7-7.5 10.9-8.8 2-1.1 3.7-1.7 5.1-1.7 4.1 0 7 1.7 8.6 5 .4.9.5 1.8.5 2.5zm-35.5-4.6l4.1.1c1.1-.2 2.2-.9 3.4-2 2.1-2.3 3.1-4.6 3.1-6.9-.1-.8-.3-1.2-.7-1.2-2.8.8-6.1 4.2-9.9 10zm-57.5 9.4a34 34 0 00-2.7 2.3c-.6.6-1 1.2-1.4 1.8 1.5-.4 2.6-1 3.4-1.8.4-.5.6-1 .6-1.7v-.6z"/>
</svg>
</h3>

How to avoid row names in further analysis in R?

I´m just running the following example from GGEBiplotGUI package and of course, it works properly.
library(GGEBiplotGUI)
data("Ontario")
Ontario
GGEBiplot(Data = Ontario)
But when I download "Ontario" data and I want to run the above cited script on my PC. See the example below.
Ontario <- read.csv("Book.csv")
library(GGEBiplotGUI)
GGEBiplot(Data = Ontario)
The result is the following table (from column 0 to 10) taking numbers (From 1 to 17) as genotypes and "X" as another location.
See the result below please.
X BH93 EA93 HW93 ID93 KE93 NN93 OA93 RN93 WP93
1 ann 4.460 4.150 2.849 3.084 5.940 4.450 4.351 4.039 2.672
2 ari 4.417 4.771 2.912 3.506 5.699 5.152 4.956 4.386 2.938
3 aug 4.669 4.578 3.098 3.460 6.070 5.025 4.730 3.900 2.621
4 cas 4.732 4.745 3.375 3.904 6.224 5.340 4.226 4.893 3.451
5 del 4.390 4.603 3.511 3.848 5.773 5.421 5.147 4.098 2.832
6 dia 5.178 4.475 2.990 3.774 6.583 5.045 3.985 4.271 2.776
7 ena 3.375 4.175 2.741 3.157 5.342 4.267 4.162 4.063 2.032
8 fun 4.852 4.664 4.425 3.952 5.536 5.832 4.168 5.060 3.574
9 ham 5.038 4.741 3.508 3.437 5.960 4.859 4.977 4.514 2.859
10 har 5.195 4.662 3.596 3.759 5.937 5.345 3.895 4.450 3.300
11 kar 4.293 4.530 2.760 3.422 6.142 5.250 4.856 4.137 3.149
12 kat 3.151 3.040 2.388 2.350 4.229 4.257 3.384 4.071 2.103
13 luc 4.104 3.878 2.302 3.718 4.555 5.149 2.596 4.956 2.886
14 m12 3.340 3.854 2.419 2.783 4.629 5.090 3.281 3.918 2.561
15 reb 4.375 4.701 3.655 3.592 6.189 5.141 3.933 4.208 2.925
16 ron 4.940 4.698 2.950 3.898 6.063 5.326 4.302 4.299 3.031
17 rub 3.786 4.969 3.379 3.353 4.774 5.304 4.322 4.858 3.382
How can I fix this problem? I mean, in order to avoid "rownames" and "x" as a variables in the GGEBiplotGUI analysis.
I have also tried with these codes and they didn´t work:
attributes(Ontario)$row.names <- NULL
print(Ontario, row.names = F)
row.names(Ontario) <- NULL
Ontario[, -1] ## It deletes the first column not the 0 one.
Many thanks in advance!
This code worked properly.
Ontario <- read.csv("Libro.csv")
rownames(Ontario)<-Ontario$X
Ontario1<-Ontario[,-1]
library(GGEBiplotGUI)
GGEBiplot(Data = Ontario)

How can I convert the qblast XML output into the NCBI BLAST -outfmt 17?

I started my project with the NCBI standalone BLAST and used the -outfmt 17 option. For my purpose that formatting is extremely helpful. However, I had to change to Biopython and I'm now using qblast to align my sequences to the NCBI NT database. Can I save/convert the qblast XML in a format which is comparable to the NCBI BLAST standalone -outfmt 17 format?
Thank you very much for your help!
Cheers,
Philipp
I'm going to assume you meant -outfmt 7 and you need an output with columns.
from Bio.Blast import NCBIWWW, NCBIXML
# This is the BLASTN query which returns an XML handler in a StringIO
r = NCBIWWW.qblast(
"blastn",
"nr",
"ACGGGGTCTCGAAAAAAGGAGAATGGGATGAGAAGGATATATGGGTAGTGTCATTTTTTAACTTGCAGAT" +
"TTCATCCTAGTCTTCCAGTTATCGTTTCCTAGCACTCCATGTTCCCAAGATAGTGTCACCACCCCAAGGA" +
"CTCTCTCTCATTTTCTTTGCCTGGGCCCTCTTTCTACTGAGGAGTCGTGGCCTTCCATCAGTAGAAGCCG",
expect=1E-5)
# Now we read that XML extracting the info
for record in NCBIXML.parse(r):
for alignment in record.alignments:
for hsp in alignment.hsps:
cols = "{}\t" * 10
print(cols.format(hsp.positives / hsp.align_length,
hsp.align_length,
hsp.align_length - hsp.positives,
hsp.gaps,
hsp.query_start,
hsp.query_end,
hsp.sbjct_start,
hsp.sbjct_end,
hsp.expect,
hsp.score))
Outputs something like:
1 210 0 0 1 210 89250 89459 8.73028e-102 420.0
0 206 19 2 5 210 46259 46462 5.16461e-73 314.0
1 210 0 0 1 210 68822 69031 8.73028e-102 420.0
0 206 19 2 5 210 25825 26028 5.16461e-73 314.0
1 210 0 0 1 210 65887 66096 8.73028e-102 420.0
...

Renjin could not find function 'engine.eval

I am running Java on Linux (CentOS), via the command line.
When I put the R command is a separate file, described in Section 1.4 of these docs,
I get the error:
Exception in thread "main" org.renjin.eval.EvalException: could not
find function 'engine.eval'
at org.renjin.eval.Context.evaluateFunction(Context.java:269)
at org.renjin.eval.Context.evaluateCall(Context.java:260)
at org.renjin.eval.Context.evaluate(Context.java:193)
at org.renjin.eval.Context.evaluateExpressionVector(Context.java:252)
at org.renjin.eval.Context.evaluate(Context.java:191)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:131)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:127)
at org.renjin.script.RenjinScriptEngine.eval(RenjinScriptEngine.java:107)
at pkg3.Temp3.main(Temp3.java:31)
I have the CLASSPATH set correctly, because:
cd ~/rjtest
javac pkg3/Temp3.java
cd ~/rjtest
java pkg3.Temp3
produces:
x y
1 1 1.121
2 2 0.525
3 3 1.811
4 4 1.914
5 5 5.389
6 6 8.501
7 7 6.477
8 8 7.805
9 9 8.625
10 10 10.033
Call:
lm(formula = y ~ x, data = df)
Coefficients:
(Intercept) x
-0.902 1.113
Modifing the code to move the 3 engine.eval statements into script.R:
// engine.eval("df <- data.frame(x=1:10, y=(1:10)+rnorm(n=10))");
// engine.eval("print(df)");
// engine.eval("print(lm(y ~ x, df))");
engine.eval(new java.io.FileReader("/pathto/rjtest/pkg3/script.R"));
javac compiles with no error, but java gives the error.
The code engine.eval() is a Java statement. The Exception you're getting is Renjin telling you that there is no R function called engine.eval. Your script.R should contain:
df <- data.frame(x=1:10, y=(1:10)+rnorm(n=10))
print(df)
print(lm(y ~ x, df))"
Not:
engine.eval("df <- data.frame(x=1:10, y=(1:10)+rnorm(n=10))")
engine.eval("print(df)");
engine.eval("print(lm(y ~ x, df))")
Which is, coincidentally, valid R syntax, but not what you want.

Resources