Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aligned BAM files have some reads with not its paired mates #2106

Open
teryyoung opened this issue Apr 2, 2024 · 2 comments
Open

Aligned BAM files have some reads with not its paired mates #2106

teryyoung opened this issue Apr 2, 2024 · 2 comments

Comments

@teryyoung
Copy link

I run STAR with pair-end reads and get bam file, I sorted it with picard in queryname order, but when I run downstream analysis, It told me there is some reads E150030108L1C007R02000101377 did not have a primary R1 record.
I checked the fastq file and bam file, maybe the STAR filtered this R1 reads, but retained the R2. Is there options to filter paired reads simultaneously?
the fastq file is like this:
`$ grep 'E150030108L1C007R02000101377' tmp/CT.uBAM_1.fq -A 4
@E150030108L1C007R02000101377/1
GGGGCCGCGGCCGGGGACCGCTCCCCGCCGCGGCCCCAGTTGGC
+
GGGGFGCBFF<GFFIG-F?F:FFF7D;FFGF
@E150030108L1C007R02000101839/1

$ grep 'E150030108L1C007R02000101377' tmp/CT.uBAM_2.fq -A 4
@E150030108L1C007R02000101377/2
TGATACGTGGGCTCCCGCTGGCCTGTACATTCCTGGAGGTAAGTGTTGTGTCTAGAGGGAAGCAGAACAAACAATGAAATGGAAGTGAGTTCCTGGTGAAAACCCAGTTTGGGAGACAGAGCCTCCTACCCGTACTCCCAGGC
+
9E/AEDF8B<B@:;8B@99B?>A4?9@BB9?B3C@81;:;C6B:=*AB@E;6CCB6>:9/93+5B25=+8<91@998<6;D;6;57105.B;?4<<1A:<9:-9=D5B,5-*C140A)E.7B?0C9)D;5+23BE:C>C592>
@E150030108L1C007R02000101839/2
I search the PE reads in bam file, results is like this:samtools view 0.1.uBAM/CT.umi.mapped.bam |grep 'E150030108L1C007R02000101377'
E150030108L1C007R02000101377 137 chr1 19084648 60 143M * 0 0 TGATACGTGGGCTCCCGCTGGCCTGTACATTCCTGGAGGTAAGTGTTGTGTCTAGAGGGAAGCAGAACAAACAATGAAATGGAAGTGAGTTCCTGGTGAAAACCCAGTTTGGGAGACAGAGCCTCCTACCCGTACTCCCAGGC 9E/AEDF8B<B@:;8B@99B?>A4?9@BB9?B3C@81;:;C6B:=*AB@E;6CCB6>:9/93+5B25=+8<91@998<6;D;6;57105.B;?4<<1A:<9:-9=D5B,5-*C140A)E.7B?0C9)D;5+23BE:C>C592> RG:Z:A NH:i:1 HI:i:1 nM:i:2 AS:i:137 RX:Z:GCCAA-GTTGA`
there isn't another "E150030108L1C007R02000101377" entry.

@alexdobin
Copy link
Owner

If one of the mate is unmapped, you need to use --outSAMunmapped Within to keep it in the SAM/BAM file.

@teryyoung
Copy link
Author

@alexdobin thanks very much!I got it successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants