some unrelated info in SAM file generated by BWA
3
0
Entering edit mode
5.6 years ago
zhangdengwei ▴ 210

hi,

I found there is an unrelated row, not the header, existing in my SAM file, which produced by BWA mem. like the error below ([M::process] read 397352 sequences (120000304 bp)...[M::mem_process_seqs] Processed 397352 reads in 815.105 CPU sec, 67.779 real sec):

SRR5439471.393892       0       chr3    25046051        60      147M155S        *       0       0       ATCATGTAGTCTGCCCGGCTCTTTTGGTCCTAGATCAGAAAGAGGCTTTTGCAAACCCACCATTTCTGGGGTTGAATGGGAAATTAGGGAAAGAAAATGAGGTCAAGAAAGGCATGGAGAAAAAAACCGCTGGGCCTGTTGGCCTGAACGGTTCTTGAGAACTGCCATCACTTGTAGCTTCAAATCAGCTGCCAAAAATAGTGGAAAGACTAATTGTTATTTCAGGTATAAAGAAACAGCAACGGTGGACCGATGATCATCGGTCCACCGTGAACTGCCTGAGTTACTTGTCCCTGCCTCTG  HHHHHHHHGGGGGGGGHHHEHHHEHHHHGHHHHHHGHHHHHHHHHEFEHHHGGFAGEFGGHHFHHGGGGHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHGHHHHHHHGHHHHGGGGGEEGGHGFGGGGCGGCBBFFFFFBABBBBBBBBFF4AFFFGGGGGGGGGGHHHHHHHGGHHHHHHHBGHGHHGHGHHHHHHBGHHHHHHHFFHHHHHHHHHGGHHHHGHHGHFHHHHHHHEGEGFHHHGGGGGEFHGHEFEEGHHHGHGGGHBFHHHF2FGHHHHHHHHHHHHHHHHHF  NM:i:0  MD:Z:147        AS:i:147        XS:i:0  SA:Z:chr1,183484475,-,61S90M151S,60,0;chr2,171679085,+,271S31M,60,0;
SRR5439471.393892       2064    chr1    183484475       60      61H90M151H      *       0       0       TGCTGTTTCTTTATACCTGAAATAACAATTAGTCTTTCCACTATTTTTGGCAGCTGATTTGAAGCTACAAGTGATGGCAGTTCTCAAGAA      HHHHHFHGHHGHHHHGGHHHHHHHHHFFHHHHHHHGBHHHHHHGHGHHGHGBHHHHHHHGGHHHHHHHGGGGGGGGGGFFFA4FFBBBBB      NM:i:0  MD:Z:90 AS:i:90 XS:i:19 SA:Z:chr3,25046051,+,147M155S,60,0;chr2,171679085,+,271S31M,60,0;
SRR5439471.393892       2048    chr2    171679085       60      271H31M *       0       0       GAACTGCCTGAGTTACTTGTCCCTG
[M::process] read 397352 sequences (120000304 bp)...[M::mem_process_seqs] Processed 397352 reads in 815.105 CPU sec, 67.779 real sec
CCTCTG  GGGHBFHHHF2FGHHHHHHHHHHHHHHHHHF NM:i:0  MD:Z:31 AS:i:31 XS:i:0  SA:Z:chr3,25046051,+,147M155S,60,0;chr1,183484475,-,61S90M151S,60,0;
SRR5439471.393893       16      chr3    25046051        60      151M151S        *       0       0       ATCATGTAGTCTGCCCGGCTCTTTTGGTCCTAGATCAGAAAGAGGCTTTTGCAAACCCACCATTTCTGGGGTTGAATGGGAAATTAGGGAAAGAAAATGAGGTCAAGAAAGGCATGGAGAAAAAAACCGCTGGGCCTGTTGGCCTGAGCACGCCAACCACCCACCTCGGTCTCCCAAAGGGCTGGAACGGTGGACCGATGATCATCGGTCCACCGTTCTGTTACTTAGGGAAATTACAAGCATATTAAGTTCAGCTGCCTTAGCAAAGCTTCAGAACTTCTTAAGGTTTAATATTTTTATTA  FEGHHGHHHEGGGGGGHHEGGEHHGGGBHHFHHHHGHHGHHHHHG3HHHHHGGGGGGFHHHHHFGGGGGHHHHHHHHHHHHHHHHGGHHHHHHHGHHHHHHGHHHHHHHHHHGHHHHHHGGGGGGEGGHGGGGGGGGGGCBFF4FFAABBBABCCCCCCCCCCGGGGGGGGGGHHHHHHFGGHGGHHHFGBFFGHHGGGGHHHHHHHGGGGHHHGGEHGHHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHGHHHHHHHHHHHHHHHGHHG  NM:i:0  MD:Z:151        AS:i:151        XS:i:0  SA:Z:chr3,25045723,-,216S86M,60,0;chr4,169910618,+,115S36M151S,37,0;
SRR5439471.393893       2064    chr3    25045723        60      216H86M *       0       0       TCTGTTACTTAGGGAAATTACAAGCATATTAAGTTCAGCTGCCTTAGCAAAGCTTCAGAACTTCTTAAGGTTTAATATTTTTATTA  EHGHHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHGHHHHHHHHHHHHHHHGHHG  NM:i:0  MD:Z:86 AS:i:86 XS:i:20 SA:Z:chr3,25046051,-,151M151S,60,0;chr4,169910618,+,115S36M151S,37,0;*

And my alignment command is

nohup bwa mem -t 12 GRCh38.bwa VEGFA_site_1.fastq.gz > VEGFA_site_1_output.sam &

Was my command incorrect? Thanks for your help!!!

sequencing • 2.5k views
ADD COMMENT
4
Entering edit mode
5.6 years ago

Well, there is your problem. If you use nohup then STDOUT and STDERR get combined in the output file. Either don't use nohup or use the -o option as mentioned by Bastien Hervé

ADD COMMENT
3
Entering edit mode
5.6 years ago

Please use the option -o to output your sam file and not redirecting to standard output using >. In your case you have BWA verbose in your sam file, caused by redirection

bwa mem -t 12 GRCh38.bwa VEGFA_site_1.fastq.gz -o VEGFA_site_1_output.sam
ADD COMMENT
0
Entering edit mode

Sorry, my version of BWA is 0.7.12-r1039, and there is no -o option. Did we use the same version?

ADD REPLY
1
Entering edit mode

I have this one Version: 0.7.17-r1188

-o FILE       sam file to output results to [stdout]
ADD REPLY
0
Entering edit mode
5.6 years ago
GokalpC ▴ 100

If you must use nohup and there is no -o FILE option call bwa from an inner bash call.

nohup bash -c 'bwa mem -t 12 GRCh38.bwa VEGFA_site_1.fastq.gz > VEGFA_site_1_output.sam' &

That should take care improper redirection of stdout.

ADD COMMENT

Login before adding your answer.

Traffic: 2675 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6