Entering edit mode
6.4 years ago
suny.bio
•
0
I am trying to run the cufflinks program in loop so that I can process all the samples at once with the below shell script. But it's not working. Individually the files working ok.
Please help.
INPUT=/data/test
OUT1=/data/cufflinks_out
ANNOTATION=/data/annotation
for file in $( find `echo $INPUT/*.bam` -type f);
do
name=eval basename $file;
echo $name;
s=${file##*/};
echo ${s%.*};
cufflinks -p 12 \
-G $ANNOTATION/mouse_M17_annotation.gtf \
-o $OUT1/${s%.*} \
$INPUT/$name ;
done
Hello suny.bio,
Please use the formatting bar (especially the
code
option) to present your post better. I've done it for you this time.Thank you!
You should know that the old 'Tuxedo' pipeline of Tophat(2) and Cufflinks is no longer the "advisable" tool for RNA-seq analysis. The software is deprecated/ in low maintenance and should be replaced by HISAT2, StringTie and ballgown. See this paper: Transcript-level expression analysis of RNA-seq experiments with HISAT, StringTie and Ballgown. There are also other alternatives, including alignment with STAR and bbmap, or pseudo-alignment using salmon, followed by DESeq2 or edgeR.
I have STAR aligned accepted.bam files and I like to count FPKM from those accepted.bam files. So, I am using cufflinks to produce the FPKM tables. Could you suggest which program I can use to calculate FPKM values from STAR aligned .bam files?
From star aligner, how many outputs do you have? Since anyway, it is not working, move on to stringtie instead of cufflinks. I am suggesting you stringtie not because cufflinks is not working, but because work is not yet started. Better to start with some thing that is recommended by cufflinks authors which is stringtie. @suny.bio
ps: you don't have to apply coding format for normal text.
I have 73 samples and like to run in batches with any other program which will calculate the FPKM. Could you suggest one?
stringtie can output FPKM and two more quantifications @suny.bio.
FPKM is rarely an appropriate normalization method. What is your aim with these counts?
Please post the error
It just stuck it here for a long time every time I tried.
I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
warning is home calling warning. You can ignore that. Second warning is about your bam files. You need to validate bam files provided to the pipe. Try to run cufflinks on one or two bam files instead of loop. If code throws same error again, it is the problem with your bam file (from the error message you have posted). But it seems to me, that you have not posted entire error. If so, post entire error. If entire error is posted, then validate bam files.
edit: Seems bam files are not at all passed to cufflinks, instead a directory name is being passed as input.
There is no output after it saying "Inspecting reads and determining fragment length distribution." same single file with cufflinks processing ok. it's only during the loop not working properly.
$INPUT/$name
is not passing bam files to cufflinks. Addecho
before links and run the program. You would see that bam file is not passed to cufflinks.change a line in the loop from
name=eval basename $file;
toname=$(basename $file)
. Please take a back up of your code first and then run the modified code on one or two bam files.Thanks cpad0112. It's now working!!