Hello,
I've got a SAM file that was aligned using HISAT2, I've converted it into a BAM file using samtools view, I then wanted to sort it using samtools sort and this output comes out and just keeps going and going so I stop it.
G{�q�[�p�Π�������3FqB��m6�p�0���ꜘ-â��&�S��]��qn�Շ��67^�Q<GK?��=c<�>d�9�.�!�.���� 0�_�f*:�h?��'�4��닱�؍7Kp�}�
<�}�q۵��"�<���W�(�N��v�Zf��YTW�P�:�����v23l��2�
�q��@��
/�6D&������]�ש���
�Dtc+q�ʔ)�}���zX��g�=;ήT�D��9��B�)�|��J�� N<e���٘3����e>��D�R"@�E9bꁞJ���H��r�0F`���n�{�aW��(���AIu�����\xq�o��A������\{�;�u9�W%����/ٍ%��o8
��Z(�j[�EV=����@�A�Fsf�W9�-�t4�;���b�!���
��'6�����m�$v�f�e&���������u�Ni�5sZ�Dq���s&������s�y@Lʑas{�qM��S����1��95|^>��w�9�¢52��1k��|r���z�gC�bV�]�7���B,F��{��'�f1Ƶв�XH%�
�'lzů��
X8���`ʁL�
k^{{�h���L�IS���?���v�ե0����H���f��hأ)<kI���~ �˟���4hQ�"�j*�tN�fltT��)�>�J��PVՄ������cbT�ډ�5��b�2xg�!���).����cS����c7���jS�pq
The ultimate goal is that I want to convert my sam file into a bam file and then index it to help with viewing. Would anyone know of a way around this or how to fix this?
I almost feel sorry for the Biostars syntax highlighter :(
Write this stuff out to a file with "> sorted.bam"
I am pleased that the site did not blow up to pieces when a BAM file is posted - though the RSS feed did.
As for the answer, what you have there is a binary, BAM file that is being output to your screen. Redirect it or use the manual to see how to save that into a file rather than a screen.
samtools has very convenient help information on the command line. Just type
samtools
orsamtools sort
to get usage information. In addition, which version are you using?Yes yes lets all troll the ubuntu newbie :) Thanks! Got it to work.
We promise not to .. only if use
ADD REPLY/ADD COMMENT
when responding to existing posts next time :) This helps keep threads logically organized.Sorry...growing pains!