BoevaLab / FREEC

Control-FREEC: Copy number and genotype annotation in whole genome and whole exome sequencing data
146 stars 49 forks source link

unable to read bam files #91

Open Lyn16 opened 3 years ago

Lyn16 commented 3 years ago

Hi, i am trying to run Control FREEC on a virtual machine on my PC. Every time after starting reading the samples, it pumps out the error says unable to read bam files. I wonder if you have any ideas about what is happening there? Thanks!!!

Control-FREEC v11.6 : a method for automatic detection of copy number alterations, subclones and for accurate estimation of contamination and main ploidy using deep-sequencing data Multi-threading mode using 8 threads ..consider the sample being male ..Breakpoint threshold for segmentation of copy number profiles is 0.8 ..telocenromeric set to 50000 ..FREEC is not going to adjust profiles for a possible contamination by normal cells ..Note, the Coefficient Of Variation won't be used since "window" = 50000 was set ..Step: 10000 ..Output directory: /home/parallels/Documents/Control_FREEC_output/ ..Directory with files containing chromosome sequences: /home/parallels/Documents/chromFa/ ..will use a threshold of 1 read(s) per SNP position to calculate beta allel frequency (BAF) values ..Sample file: /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam #sample bam file ..Sample input format: BAM #SAM, BAM, pileup, bowtie, eland, arachne, psl (BLAT), BED, Eland. All formated except BAM are also accepted GZipped. ..Control file: /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/PrECPar.final.bam #Control bam file ..Input format for the control file: BAM Error: to calculate BAF values, you need to provide mateFile in SAMtools pileup format Or you can set 'makePileup' parameter true by providing a path to a VCF file with SNP positions ..since you mateFile is not in SAMtools pileup format, the BAF values will not be calculated ..Polynomial degree for "ReadCount ~ GC-content" or "Sample ReadCount ~ Control ReadCount" is 3 ..Minimal CNA length (in windows) is 1 ..File with chromosome lengths: /home/parallels/Documents/chr_hg19.len ..Mappability file/home/parallels/Documents/out100m2_hg19.gem be used: all low mappability positions will be discarded Warning: FREEC will not use option 'uniqueMatch' since FREEC is not going to use mappability or GC-content for normalization of copy number profiles ..uniqueMatch = FALSE ..average ploidy set to 2 ..break-point type set to 4 ..noisyData set to 0 ..minimal number of reads per window in the control sample is set to 10 ..Control-FREEC will look for subclones present in at least 20% of cell population ..File /home/parallels/Documents/chr_hg19.len was read ..[genomecopynumber] Starting reading /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam #sample bam file Error: unable to open /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam #sample bam file

valeu commented 3 years ago

Dear Lyn, most likely there is problem with a path to this bam file. Can you do ls media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam from where you run freec?

Lyn16 commented 3 years ago

Hi, Here is the result when I run ls media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/ from the dir where I run freec

parallels@ubuntu-linux-20-04-desktop:~/FREEC-11.6/src$ ls /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/ CN9R1_1.final.bam CN9R2_1.final.bam.bai PrECPar.final.bam.bai CN9R1_1.final.bam.bai Mapping_Readme.pdf SAMv1.pdf CN9R1_2.final.bam 'MD5 (1).txt' CN9R2_1.final.bam PrECPar.final.bam

and when i run ls media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam, it shows:

parallels@ubuntu-linux-20-04-desktop:~/FREEC-11.6/src$ ls media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam ls: cannot access 'media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam': No such file or directory

valeu commented 3 years ago

my apologies, I meant/media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam which seems to exist.

Is it accessible for reading? "ls -l"?

Lyn16 commented 3 years ago

Hi, Yes, the file should be accessible for reading.

parallels@ubuntu-linux-20-04-desktop:~/FREEC-11.6/src$ ls -l /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam -rwxr-xr-x 1 parallels parallels 36169156219 Nov 18 2019 /media/psf/seq_data/WGSdata/tumor_sample_raw_data/Bam/CN9R1_1.final.bam

valeu commented 3 years ago

and you provided a path to samtools or included samtools into /urs/bin/ , right?

Lyn16 commented 3 years ago

Yes, I included samtools into /usr/bin/ parallels@ubuntu-linux-20-04-desktop:~$ ls -l /usr/bin/samtools

-rwxr-xr-x 1 root root 555296 Dec 25 2019 /usr/bin/samtools

and in the configuration file for control FREEC, I added the samtools path as

samtools=/usr/bin/samtools

valeu commented 3 years ago

I am sorry, but I have no idea what can happen. I guess you can view the file with "samtools view" ?