Entering edit mode
                    6.1 years ago
        zizigolu
        
    
        ★
    
    4.4k
    Hi
I have a .sam file from STAR; For me picard SortSam gives errors on my machine so I want to use samtools
Is there any command gives a sorted .bam at the same time by samtools without first converting .sam to .bam then sorting .sam?
Alternatively, tell STAR to produce sorted BAM output as in this manual.
Thank you I tried telling STAR but giving nothing
C: How I know a file is sam or bam, sorted or unsorted
I am not a regular
STARuser but perhapsSTARneedssamtoolsto be available in your$PATHfor that option to work?What did the log file of STAR have to say about the error? If you want to actually solve issues rather than just trying out new tools you might be unfamiliar with, it might be more useful to try to follow the suggestions by the users here.
Sorry I faced a problem
I repeated this command 2 times in 2 different folders but I obtained 2 .bam files with different size one
2046643 KBand another2036831 KBHow I know which .bam is valid or intact?
How much RAM are you assigning to this job? If you have a large SAM file you may need to assign more RAM.
@ Friederike STAR did not give any error but output was unsorted .sam
You may also need to use
--limitBAMsortRAMif you don't have enough RAM available.